An interactive shell, scripting and programming language, and surrounding environment from Microsoft. Commonly used by system administrators managing Microsoft software (including Windows, Exchange, SharePoint, and cloud services Azure and Office 365), PowerShell is included by default with Windows, ...

learn more… | top users | synonyms (1)

3
votes
0answers
47 views

Batch script is not getting executed when called by Start-Process Cmdlet

I have a strange issue on a Windows Server 2012 R2 here that just does not make any sense to me at all. I've got a PowerShell script that basically has the following structure: Function ...
3
votes
0answers
166 views

Import Powershell AD Module during MDT Task Sequence

I have written this short powershell script to rename a computer as part of an MDT task sequence: Import-Module ActiveDirectory $AdminUsername = 'domain.com\administrator' $AdminPassword = ...
2
votes
0answers
34 views

How to retrieve a MDT task sequence variable and use it properly inside Powershell

I'm trying to retrieve a MDT task sequence variable inside a Powershell script, then use that variable in a Powershell function. My problem lies in that the variable I want to retrieve contains a ...
2
votes
0answers
69 views

Powershell - Sort-Objects, list of IP Adresses

I got a /20 network and I want to know all used IP Adresses and their attributes like the MAC, the name and the description plus all free addresses between the used ones so that I got a long list ...
2
votes
0answers
40 views

Set CMTrace Font

Might be a bit of a long shot but I was wondering if anyone knew of, or could speculate on, a way to change the default font of CMTrace. It seems to use some Sans-Serif font. I'd like to change it to ...
2
votes
0answers
78 views

Powershell command providing incomplete list

This PS command is only returning 10 out of 12 groups that the user is member of. Anyone know why that will be? Get-ADUser -Identity username -Properties memberOf | Select -ExpandProperty memberOf ...
2
votes
0answers
151 views

Powershell Install-WindowsFeature Application-Server (and subfeatures) and assign certificate

I want to use a Powershell script to install Application Server on a windows 2012 server. When using the wizard, it prompts for you to select a certificate (for WS-Atomic Transactions) from the local ...
2
votes
0answers
133 views

Query performance counters from powershell

I am trying this script to query performance counters in different localized windows server versions. http://www.powershellmagazine.com/2013/07/19/querying-performance-counters-from-powershell/ ...
2
votes
0answers
590 views

Powershell and sharepoint and updatelistitems() exception

I've got an issue where I keep getting "Exception calling "UpdateListItems" with "2" argument(s): "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." whenever I ...
2
votes
0answers
368 views

Setting a VM boot CD via PowerCLI

I have a sneaking suspicion that this may be a bug, but I'm definitely willing to entertain the possibility that I'm doing things wrong. I have a VMware virtual machine in $vm, and I'm trying to ...
1
vote
0answers
21 views

How do I script a change to the msmq storage location on Windows 2008 R2 server

Is there any way of doing this through a batch or powershell script? I'm looking for a way to set up several new servers. The only thing I found on the subject leads me to believe you cannot: from ...
1
vote
0answers
10 views

Does Stop-CauRun Stop the Current Server or the Whole CAU action?

When using a PreUpdateScript or PostUpdateScript with "Windows Cluster Aware Updating" and "Updating Run Profiles" would calling the cmdlet Stop-CauRun do any of the following: Would it actually ...
1
vote
0answers
26 views

Can not install Office 2010 via winrm

I am trying to install Microsoft Office 2010, I have created a MSP and config.xml file so I can do this from Powershell, using the following command: Start-Process "C:\temp\Office2010\x86\setup.exe" ...
1
vote
0answers
43 views

How to fix powershell `Import-Module DnsClient` failure 'Cannot process Cmdlet Definition XML'

I seldom use PowerShell but I wanted to use Set-DnsClientServerAddress. Running it directly tells me I need to import module DnsClient. When I run Import-Module DnsClient I get the output below. ...
1
vote
0answers
58 views

Powershell-Script is not exectued correctly

I have a power-shell-script which is called by a batch-file. The batch calls the script after it has set the execution policy to unrestricted. Currently the script does nothing more than writing a ...
1
vote
0answers
60 views

Managing Linux server from PowerShell using built-in credentials

I am the admin of a small Linux cluster running Ubuntu Server 14.04 and my workstation is Windows 10 Technical Preview (yes, a bold move to use it in production). There is an excellent free scriptable ...
1
vote
0answers
63 views

AuthorizationManager error when running ANY Powershell script (Invalid class also)

One of our Win Server 2008R2 crashed today, then after restarting it, I cannot run any Powershell script on it, I get the error "AuthorizationManager check failed." When I run the Get-ExecutionPolicy ...
1
vote
0answers
69 views

NRPE (Winrpe) Powershell Command - Unable to read output in Nagios

I'm trying to run an Powershell script from NRPE.cfg and get the output in Nagios. When i run the script on the local (Windows) server, everything is just fine. But when i put it in the NRPE.cfg en ...
1
vote
0answers
77 views

How can I force dnscmd.exe to provide its output in English?

How can I force dnscmd.exe to provide its output in English? I have automation that parses the output of various dnscmd commands, such as dnscmd /info > dnsInfo.txt. I'm using PowerShell to ...
1
vote
0answers
47 views

Logman user switch confusion

I'm setting up a powershell script that installs a logman counter on several servers that are in dire need of some performance monitoring. The documentation states that the -u switch works with ...
1
vote
0answers
68 views

Powershell Script to audit all mapped drives in an OU

Similar to this post: http://powershell.com/cs/forums/p/9777/16289.aspx I'm looking for a powershell script that will let me query all the machines in an OU on my network and see what drives they have ...
1
vote
0answers
208 views

New-PSSession across domain boundaries

I am trying to bring up a virtual machine that needs to be able to create new sessions (with New-PSSession). The highly engaging about_Remote_Troubleshooting is my constant companion, of course! ...
1
vote
0answers
150 views

Calling Physical Path Credentials for Web Applications in IIS

How would I call on the Physical Path credentials property for web applications in IIS using PowerShell? I can't print out the username or password, but I can print the logonMethod which uses the same ...
1
vote
0answers
3k views

Copying files from local server to remote server using powershell

Apologies if this has already answered directly or indirectly in SF. My requirement will be as follows: Move a deployment folder that has got files and subdirectories to a remote sever. Pass ...
1
vote
0answers
1k views

RDS installation failure on 2012 R2 Server Core VM in Hyper-V Server

I'm currently installing a test-bed for my firms Infrastructure replacement. 10 or so Windows/Linux servers will be replaced by 2 physical servers running Hyper-V server. All services (DC, RDS, SQL) ...
1
vote
0answers
182 views

Running New-RDSSessionDeployment Remotely

I'm trying to script the setup of a remote desktop deployment into Azure. I'm using Powershell remoting to connect to the WinRM endpoint on the VM's and execute remote Powershell. For the most part ...
1
vote
0answers
72 views

Remotely edit winrm conf file

Im trying to edit the winrm conf file on remote computer. I dont have the possibility to use GPO edit so i must find another way. I've tried to set the configurations that i need by using the "winrm ...
1
vote
0answers
100 views

Enter-PSSession returns PSRemotingTransportException

When I try to connect to a distant server using Enter-PSSession, I have a PSRemotingTransportException. It says that the user is either unknown or associated with a wrong password. It works with ...
1
vote
0answers
35 views

Why is $job.LastRunOutCome always “Failed”?

I am using sqlps to run a backup job "Backup Something". Set-Location "SQLSERVER:\sql\$hostname\default\jobserver\jobs" $job = Get-ChildItem | Where-Object {$_.Name -eq "Backup Something"} ...
1
vote
0answers
531 views

ftp get won't save on Windows Server

From a Windows Server 2012, using PoweShell, I connect to a remote device through ftp and run get to retrieve a file. The process goes through with no problems but the file doesn't get saved on to my ...
1
vote
0answers
1k views

Exchange (2013) Powershell Connection Error

I am using Windows 2008 R2 with Exchange 2013 I am trying to connect to my exchange server with the following command but receive an error each time: $session = New-PSSession -ConfigurationName ...
1
vote
0answers
64 views

Powershell remoting and SPNs

I'm attempting to configure powershell remoting on a newly built server and am confused about something. Specifically, the WSMan listener is configured to use port 5985, but when I add the SPN ...
1
vote
0answers
835 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 ...
1
vote
0answers
387 views

Cannot create partition on disk using PowerShell: “New-Partition : Not enough available capacity”

I'm trying to create two partition on the USB flash drive. The first small 350Mb partition is created fine, but the second throws "New-Partition : Not enough available capacity" even though there is a ...
1
vote
0answers
319 views

Cannot initialize disk in PowerShell : Initialize-Disk throws “The disk has already been initialized”

I'm trying to change the flash drive's partition style to GPT using PowerShell, but the cmdlet throws "The disk has already been initialized" (even though I've cleaned the drive): PS ...
1
vote
0answers
298 views

How to install Admin tools on Windows 7 and Windows XP workstations via powershell?

we have around 250 workstation(mix of windows 7 and XP SP3) ; we are delegating those users some admin tasks via task pads and they need admin tool pack(containing AD tools such as dsa.msc etc) for ...
1
vote
0answers
218 views

PowerShell & FileNotFoundException : which file?

I'm trying to follow the instructions in http://technet.microsoft.com/en-us/library/gg697165.aspx, but my powershell script keeps throwing exceptions. It refers to a FileNotFoundException...but I ...
1
vote
0answers
570 views

Detecting missing drivers for Hyper-V Server 2012

Assume I installed Hyper-V Server 2012. Networking is working fine. The server is locked down, only RDP is enabled. Enabling other ports may not be an option as the server is directly connected to ...
1
vote
0answers
129 views

PowerShell Calculated Properties

I'm trying to use a calculated property on Get-VM. I want to get the shortened version of the hostcluster property using split, but its not working. Here's an example of what I'm trying to do: ...
1
vote
0answers
438 views

IIS Application Request Routing(Monitoring and management) Powershell

I am working with iis arr powershell... In my iis i have one web farm and in that i have two servers "server1" & "server2"...... My task is Make server1 unavailable gracefully restart server1 ...
1
vote
0answers
158 views

Modifying Authentication on web application / service in IIS(7/.5) via Powershell

I am trying to install a wcf-servce by using New-WebApplication in powershell. It works fine. However, how can I Modify the Authentication? I want to enable Anonymous Access Authentication and disable ...
1
vote
0answers
401 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) ...
1
vote
0answers
5k views

List ALL Printers using Powershell

I'm having issues listing all the printers on a computer using Powershell. We have a batch script that will add/remove/list "per computer" printers using PrintUI. I can use PrintUI to list the ...
1
vote
0answers
201 views

PowerShell script halts execution when Windows XP PC is locked

I have the following script that does a continuous ping and reports failures. It works fine, except the loop apparently "suspends" when the computer is locked. I have confirmed this by starting the ...
1
vote
0answers
381 views

Can you use SQLite 64 bit odbc from powershell

Basically, my question is "Does this combo work for anyone," and, "Can you see what I am doing wrong" I have installed 64 bit ODBC driver for sqlite, downloaded from this page. I am running ...
1
vote
0answers
355 views

Powershell: Cannot connect via SSL

Am following "secrets to powershell remoting" to setup an SLL account and seem to be missing a step. I ran Winrm create winrm/config/Listener?Address=*+Transport=HTTPS ...
1
vote
0answers
177 views

Office 365 Mounted Workspaces disconnect after 2 hours - How to work around?

I'm trying to get my sharepoint workspaces on office 365 to mount like network drives. I can achieve this following microsoft guidelines, but after a while this fails. The user has to login again to ...
1
vote
0answers
725 views

Exchange 2003 Strip Email Attachments save to User file

I'm currently using this vba script (locally on client) to strip email attachments from user's folder to and move to user document folder and then replace with a pointer in the email to reference the ...
1
vote
0answers
92 views

iis6 silent installation from a remote machine

I am trying to install iis6 on a remote machine running windows 2003 through powershell remoting. It does not seem to work. The same script works fine when run from the local machine. I have been ...
1
vote
0answers
490 views

Certreq -retrieve can't find the specified CA

I'm currently writing a Powershell script and have run into a bit of a roadblock. Basically, the script requests, approves, and retrieves new certificates from our CA using certreq.exe and ...