Questions tagged [powershell-remoting]

The ability to create a remote connection, in an other way than using WMI, is the most important difference between PowerShell v 1.0 and 2.0.

Host applications can use a PowerShell object to run commands that use WS-Management-based Windows PowerShell remoting to create a temporary or persistent connection to the remote computer. This includes establishing an interactive session with a single remote computer.

1238 questions
2
votes
2 answers

Powershell: Two parameter definitions for different environments?

I have a long and quite big PS5 powershell script with several parameters, defined in the param() section at the beginning of the script file. These params are strings and hashtables, including hostnames, ip addresses, domains etc. This script runs…
mrt
  • 307
  • 1
  • 2
  • 13
2
votes
1 answer

Powershell Remoting Speeding up a Foreach Loop Hosted Exchange

I have a CSV of email adddresses and Departments that I need to set on Live@edu. The command I currently have looks something like this: Import-CSV departments.csv | ForEach-Object { Set-User $_.EmailAddress $_.Department }` The problem is, this…
2
votes
1 answer

Change value in registry on multiple servers using credentials

Looking to enable reg key on multiple remote machines. Attempt 1: $Servers = Get-Content "C:\PowerShell\TestServers.txt" $Path = "HKLM:\SYSTEM\CurrentControlSet\Services\" $Property = "*REG_WORD NAME*" $Value = "1" Foreach ($Server in $Servers) { …
2
votes
1 answer

Remoting powershell across a VPN

I've seen a few different tutes covering remoting configuration - this one seems better than average - but I'm not clear how I configure for a situation where the workstations are not of the same domain. I'm using LogMeIn/Hamachi to create a VPN -…
justSteve
  • 5,444
  • 19
  • 72
  • 137
2
votes
5 answers

How to make PowerShell V2 Remoting work with Windows Server 2003?

I was testing PowerShell remoting: I installed PowerShell V2 CTP3 on my Windows XP desktop I installed WS-Management v1.1 on my Windows 2003 R2 server, which has its firewall disabled and no PowerShell installed. Both machines have .NET Framework…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
2
votes
2 answers

how to add credentials in powershell script, so that when i run the script it wont ask for password, I do not want password to be seen in the script

When I run below script from local machine on the server name stired ub vnfqdn.txt, script pauses and asks me to enter username and credentials. I want to provide password automatically in the script in secured way. can you help me to add any…
Vinit S
  • 39
  • 10
2
votes
0 answers

Invoke-Command: continue if an exception occurs while sending a command to a Computer from a list

I'm attempting to perform a check for whether or not remoting is available on each computer of a list in parallel. I've started to do this via Invoke-Command and passing a list of IP addresses to the -ComputerName argument. The list looks something…
RawLamb
  • 117
  • 1
  • 8
2
votes
2 answers

Is there a powershell command that would power on another host?

I have a group of computers that I want to power off and then power back on, is there a Powershell command that will do this? I have the 'shutdown' command to turn them off, I can't use the reboot command. Thanks in advance!
2
votes
1 answer

Invoke-command localhost Access Denied

When Trying to invoke-Command against the Local Host I get access denied. I have confirmed that PS remoting is enabled and the account is Administrator. Additionally Remoting in from remote machine works without issue. Invoke-Command -computername…
user2850560
  • 101
  • 1
  • 2
  • 5
2
votes
0 answers

VSTS Test Agent - IPC Port Access Denied

My test agent and controller are communicating well. But, when agent machine has restarted the agent is going to offline. And it is coming "online" only when I remotely login into the machine. To automate this, I tried PowerShell script. When I run…
2
votes
1 answer

Invoke-Command returns only a single object when called using ScriptBlock and ArgumentList

When code is invoked though Invoke-Command using the -ScriptBlock, -ArgumentList and -Computer parameters, only a single item is returned from each call to the servers. Two examples can be found below highlighting the problem. $s = New-PSSession…
Steve
  • 710
  • 1
  • 6
  • 12
2
votes
1 answer

New-PsSession without creating a profile?

I need to use New-PsSession to run multiple commands on a remote computer to gather information from the registry. The problem is when I run New-PsSession, it creates a user profile with my username on the computer and after I disconnect and remove…
Rakha
  • 1,874
  • 3
  • 26
  • 60
2
votes
1 answer

Get-NetFirewallRule User{GIUD}

We are having a problem with our Windows 10 computers either not adding all of the Firewall rules from GPOs when the computer restarts or somewhere along the line. We have multiple users that log onto the consoles (usually with a roaming profile)…
Chris
  • 118
  • 1
  • 9
2
votes
1 answer

Powershell remote enabling

I am not able to connect to remote machine using powershell. The procedures i did is: Enable-PSRemoting -Force Set-Item WSMan:\localhost\Client\TrustedHosts * restart-Service winrm Enter-PSSession IpAddress When i run the last step (4th one) from…
2
votes
1 answer

Access to password protected network share (double/second hop limitation)

This is about the famous double-hop limitation that looks trivial and has at least 10 workarounds but I cannot find even one that works for my setup. Here is my environment: I have ~50 virtual machines on Windows 10, every VM runs on a separate…