-2
votes
0answers
54 views

Does a Windows Sysadmin need to be able to script? [closed]

I'm in the process of hiring a Senior Windows Systems Administrator. My experience in the past has been with Linux and I feel that you can't really work as as Linux Sysadmin without scripting skills. ...
-2
votes
1answer
56 views

Script to copy down portions of a roaming profile [closed]

I'm currently working on migrating users to Windows 7 from XP. We use roaming profiles. Xp creates a folder named "Profile", while Windows creates "Profile.V2". Theses folders are independent of each ...
2
votes
1answer
94 views

Windows Server 2012 WBADMIN Documentation?

I'm trying to set up a script to run the backups of my Virtual Machines only using WBADMIN, I've got as fas as being able to backup all the VMs using the new -HyperV switch, however I also want to ...
0
votes
0answers
25 views

Mount ISO in Windows 2012 served over NFS [duplicate]

In Windows 2012 Server, is it possible to mount an ISO file that's shared over NFS? With PowerShell, I'm mounting the NFS share using this command: [10.20.1.1]: PS C:> New-PSDrive Z -PsProvider ...
4
votes
2answers
102 views

Is it possible to list all permissions where I don't have access

I'm looking for a way to recursively go through my entire file share ( fairly large 3TB of files ) and list out all files/folders that I don't have access to. Due to a migration and some errors on ...
1
vote
0answers
151 views

Powershell Script Hard drive Inventory

I've created a script to get hard drive information from our servers. The script use WMI to query the Win32_LogicalDisk class and returns "Size (GB)", "Free Space (GB)" and "Free Space (%)" for each ...
2
votes
2answers
77 views

How to pipe an object in the powershell correctly to avoid “Expressions are only allowed as the first element of a pipeline” error

Is there any way to do the following without creating the object $obj? $obj = New-Object System.Security.Principal.NTAccount("Students") ; ...
2
votes
1answer
53 views

Reauthenticate a Remote Connection via PowerShell Script

I have a PowerShell v1 script that connects to a remote server via UNC path. After a reboot, authentication is needed because Windows apparently will not remember so the script cannot connect to the ...
0
votes
1answer
47 views

Reconnecting to a Mapped Drive after Server Restart from within PowerShell Script

I have a PowerShell v1 script that connects to a remote server via a mapped drive and moves files back and forth the remote server is identified by drive number "M" and also by UNC path ...
1
vote
1answer
46 views

PowerShell - Combining Sort-Object to list of piped commands

I need to process files in order from oldest create date to newest. I found the sort-object command which is what I need however I don't have a clue how to add it to my ForEach() statement. Can ...
2
votes
1answer
143 views

PowerShell PSCredential Argument List - Path

I need to connect to a remote server and do some file copies and moves, etc. The remote server requires authentication. What do I need to enter in for PSCredential -ArgumentList, argument #1? Is it ...
1
vote
2answers
42 views

PowerShell v1 Move-Item not Moving items

I have a script (pasted below) that's supposed to do the following: Loops and grabs all files that match a defined pattern Copies those files into another location Move the original source file into ...
1
vote
1answer
39 views

PowerShell Copy-Item Method Fails

I am trying to use PowerShell (v.1) to copy over only files that match a pattern. The file naming convention is: Daily_Reviews[0001-0871].journal Daily_Reviews[1002-9887].journal [...] When I run ...
1
vote
2answers
66 views

Pattern Matching with PowerShell 1

All, I am new to Windows admin-type stuff but I am familiar with Unix/Linux, etc. I have a simple PowerShell 1 script that should only copy files that match this naming convention: ...
0
votes
1answer
41 views

Windows: Remote Display Back in Powershell a la X11?

If I have two Linux boxes, A and B, I can SSH from A to B with X11 forwarding enabled. This allows me to use graphical applications on B and have the display rendered on Machine A. Is there a way to ...
1
vote
1answer
88 views

Batch rename files using PowerShell or other

I have a folder of images taken on two different mobile phones. The two phones use slightly different file name formats. I want to change one of them to match the other so I have a neat photo album. ...
1
vote
1answer
78 views

Running SSH command within a scheduled task

I have simple powershell script which gets the offset of a Ubuntu server with the time of the NTP server. The command I run is $result = ssh -i C:\temp\privatekey domain\username@servername ...
0
votes
1answer
156 views

Need equivalent of command with nmap, awk and grep for Windows machines with PowerShell and/or Perl

Please see this thread for reference How can I scan using nmap and Zenmap all hostnames that begin with a particular string? One of the answers in the thread above uses the following query (I take ...
2
votes
2answers
141 views

I need to list all users in Active Directory that do not have any data in the NAME field, using PowerShell

I need to list of all users in AD that do not have any entry in the NAME field (example: smith,jon) So far I have something like below Get-ADUser -filter {Name -eq " "} | FT SamAccountName I know ...
2
votes
0answers
91 views

Systems Center service template including AD

I'm trying to design an SCVMM (2012 SP1) service template that contains several machines joined in a domain, but the trick is that the very domain controller is also in the template. Ie. the template ...
3
votes
1answer
95 views

How can I add a user's domain information to the pipeline in PowerShell when using Get-ADUser?

I'm trying to enumerate the name, samaccountname, and domain that each user in my forest belongs to and write it to a text file. The script that I have now is: Import-Module ActiveDirectory ...
1
vote
1answer
165 views

Access Denied when creating a scheduled task with powershell and the com schedule.service object

I have a powershell script that creates a scheduled task using a call to RegisterTask via the Schedule.Service com object. Essentially: $ts = new-object -com Schedule.Service $ts.Connect() ...
0
votes
0answers
32 views

How can I audit remote drives for stray VSS snaps?

I discovered stray snapshots on my drives with the command DISKSHADOW> list shadows all I want to create & run a script that will audit this on every host in the network. How can I use ...
0
votes
3answers
82 views

Does Windows 2012 Server needed to be a Domain Controler for Using it as AD Webservices for Powershell

I am trying to achieve the make use of AD administrative commands such as "Get-ADUser" and "Get-ADComputer" via Powershell. All our domain controllers are Windows 2003 and we have one Windows 2012 ...
1
vote
1answer
74 views

Toggling enabled/disabled on specific triggers in a task in the task scheduler using powershell (or something else)

Related to this question: Windows Server in UTC, need Task Scheduler to shift tasks with summer time and this question: ...
0
votes
2answers
200 views

Ban IP address based on X number of unsuccessful sql server login attempts?

Is it possible to expand on the idea presented in Ban IP address based on X number of unsuccessful login attempts? to encompass IP addresses for repeated failed sql server login attempts? There are ...
2
votes
1answer
96 views

Powershell script on the hidden file share not accesible on the workstation

We have a PowerShell script script.ps1 on a hidden shared folder \\Server\Share$. We have a bat file Initiator.bat, which executes the script. The shortcut to the batch file is placed on the user's ...
0
votes
1answer
148 views

Export hardware specifications to a spreadsheet for Windows Server

I have a bunch of servers : Windows 2003 and 2008. I just wanted to export these hardware specs to a spreadsheet: cpus : num processors, clock speed, etc total hard disk space total used disk space ...
0
votes
1answer
174 views

powershell script to move backup files

I want to zip sql bakup files and move from one directory to to another directory within a system using powershell 1.0 can you help me since am a beginner
0
votes
1answer
93 views

Robocopy Copy “For Loop”

I'm trying to create a simple script that will robocopy several folders using the command below. When one folder is done copying, it moves on to the next. Does anyone have a batch/powershell for loop ...
8
votes
2answers
337 views

Using Diskpart in a PowerShell script won't allow script to reuse drive letter

I built a script that mounts (attach) a VHD using Diskpart, cleans out some system files and then unmounts (detach) it. It uses a foreach loop and is suppose to clean multiple VHD using the same ...
0
votes
1answer
59 views

Copying files from one machine to another

I'm currently generating documentation on one machine, and publishing it to a web server using the following commands in a script: net use "\\someShare" PASSWORD /user:username del /S /Q ...
1
vote
1answer
58 views

Remove content of file but not the file itself with windows scripting

How do I strip the content of a file without removing the file itself in a windows scripting environment?
1
vote
2answers
409 views

Server 2012 Data Deduplication Skipping Replica VHDs

I'm currently trying to use data deduplication on two seperate Windows Server 2012 Datacenter edition hyper-v hosts. On one, I am trying to dedupe replicas that are still being resync'd every 5 ...
3
votes
1answer
442 views

How do I Setup (Initialize, Partition, and Format) a disk using Powershell?

What is a basic example of going through the setup of a new disk (Initializing it, partitioning it, and formatting) it using powershell?
5
votes
1answer
353 views

How can I compare installed hotfixes between two Windows servers using PowerShell?

I need to compare the installed patches between a dev and production environment using PowerShell. How can I do this?
0
votes
1answer
405 views

Last computer account password change via Powershell

Does anybody know how to get last computer account password change for all servers in a domain via powershell?
14
votes
8answers
3k views

Method to integrate Powershell scripts with non-Windows workflow?

I love the smell of new machines in the morning. I'm automating a machine creation workflow that involves several separate systems across my infrastructure, some of which involve 15 year old perl ...
1
vote
1answer
248 views

Obtain device driver version and associated GUID using PowerShell?

Right now, I am getting two separate objects A Win32_NetworkAdapter WMI object A Win32_PnpSignedDriver WMI object In my previous scripts, I've made sure I was calling separate objects, and ...
2
votes
2answers
294 views

My powershell script wont save a file when run using Task Scheduler, do I need to specify a specific argument?

I have a script that downloads a temporary Excel file, copies parts of it to a new file, and saves it to a specific location on the network. The problem I'm having is that the new file is never ...
1
vote
1answer
108 views

How to dump certificate file from installer via command-line?

I'm building a script that will download and install a bunch of programs. One of those programs depends on a virtual driver, which needs its certificate to be imported in order to function. Normally, ...
4
votes
1answer
191 views

I'm looking for a robust way to determine if a service can be stopped or killed

I'm looking for a robust way to determine if a service can be stopped without data loss or corruption, or if a regular stopping will work if the service can be killed via powershell. I thought about ...
3
votes
1answer
143 views

Is it possible to get CCM Updates Schedule using Powershel or VBScript?

I want to be able to check the CCM Updates Schedule as seen in Configuration Manager Updates tab. I've been looking around on google and I've not been able to find a consistent answer to this. I ...
5
votes
1answer
488 views

Powershell Registry value to be used as variable

I am looking on how to return one value from the registry. I only want the AGENTGUID value from this command. $reg=reg query "\\$computer\HKLM\SOFTWARE\Wow6432Node\Network Associates\ePolicy ...
1
vote
0answers
221 views

PowerShell Remoting: No credentials are available in the security package

I'm trying to use the following script: $password = ConvertTo-SecureString "xxxx" -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential("domain\Administrator", $password) ...
0
votes
1answer
235 views

Does the powershell cmdlet add to or replace out-of-office settings in Exchange 2007?

When using Powershell to set Out-of-Office in Exchange 2007 (e.g.), do multiple commands containing -StartTime and -EndTime add to some internal list that Exchange maintains or does each successive ...
3
votes
2answers
466 views

Remotely run a script invoking “Run As Administrator”

This is as close to the exact question that I have, but looks like he found another way that fits the needs so it has been marked as answered: I have a Powershell script running on server A that I ...
1
vote
4answers
2k views

how to get MAC address of remote computer

I have specific situation. I want to get MAC address from a remote computer, which is not in domain. I know the hostname and IP address of the remote computer. The IP Address of my computer is ...
0
votes
1answer
267 views

Logging windows connections with netsh

I am trying to enable connection logging with netsh on Vista x64, as shown in this MSDN Article about Firewall troubleshooting... First, I enabled logging of allowed connections to ...
7
votes
3answers
2k views

How can we check PowerShell v2.0 is installed on a list of servers?

How can I check if PowerShell v2.0 is installed on a list of servers? The list of servers is a combination of Windows Server 2003 and Windows Server 2008. A vbscript or PS script would be wonderful. ...

1 2 3