4
votes
2answers
840 views

Why can a Domain Admin run a powershell cmd locally, but connecting over WinRM with the same account, command returns an UnauthorizedAccessException?

I'm trying to administer a Windows 7 machine remotely. I've enabled WinRM and can use Enter-PsSession to connect to the remote machine. However, I'm noticing a difference between running a particular ...
5
votes
4answers
5k views

How can I run a PowerShell function remotely?

Using powershell, I plan to run many functions on a remote host to gather information. Here is an example to retrieve the content of file remotely just by running a function called getcontentfile ...
2
votes
2answers
341 views

Powershell authentication over VLAN

Problem I'd like to enable remote powershell scripting for all workstation hosts on a VLAN. There's no Active Directory or Directory services whatsoever. So HOST A on subnet 192.168.1.x would like ...
4
votes
3answers
4k views

Enabling Powershell Remoting, Access is denied?

I am trying to enable Powershell remoting on a Windows 2008 R2 Server, running in workgroup mode. I ran the command Enable-PSRemoting in the PowerShell Console. PS C:\Windows\system32> ...
3
votes
3answers
569 views

One-To-Many Powershell Scripts

I'm trying to create a script to run as a scheduled task, which will run against multiple servers and retrieve some information. To start with, I populate the list of servers by querying AD for all ...
7
votes
2answers
1k views

Test for Localhost in Powershell?

I have a powershell script that calls Get-WmiObject with -Credential. However, this errors out if I am running it against the local machine: Get-WmiObject : User credentials cannot be used for local ...
2
votes
1answer
184 views

Implementing Powershell .20 (WinRM Invoke-Item) in the secure Datacenter environment

How do you secure your Windows domain environment while still enabling the Powershell 2.0 remoting capabilities (WinRM invoke-item) ? Because at the moment my company datacenter would like to ...
4
votes
2answers
7k views

Why does my PowerShell script hang when called in PSEXEC via a batch (.cmd) file?

I'm trying to remotely execute a PowerShell script using PSEXEC. The PowerShell script is called via a .cmd batch file. The reason we do this is to change the execution policy, run the powershell ...
1
vote
1answer
1k views

powershell v2 remoting - How do you enable unecrypted traffic

I'm writing a powershell v2 script that I'd like to run against a remote server. When I run it, I get the error : Connecting to remote server failed with the following error message : The ...