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
11
votes
1 answer

"Access denied" on Remote winrm

I created a Windows VM on Windows Azure with winrm over SSL set. But, I can't connect it using a powershell script. When I'm running the following: ​Enter-PSSession -ConnectionUri https://myniceapp.cloudapp.net:5986 -Credential…
Guy Korland
  • 9,139
  • 14
  • 59
  • 106
11
votes
2 answers

How can I tell if I'm in a remote PowerShell session?

I would like to execute code that is specific to remote PSSessions. That is, the code doesn't apply locally, but applies to all remote sessions. Is there any environment variable, function or cmdlet that would effectively return true if I'm in an…
Kris Harper
  • 5,672
  • 8
  • 51
  • 96
10
votes
3 answers

powershell remoting Win2008R2 "The WSMan service could not launch a host process to process the given request"

I've recently upgraded a number of servers from 2003 to 2008R2. Since the upgrade I've started to see the following error: [servername] Connecting to remote server failed with the following error message : The WSMan service could not launch a host…
10
votes
3 answers

Powershell remote fails with "The SSH client session has ended with error message: subsystem request failed on channel 0."

I am running Windows 10 Pro on one of my workstations with ssh enabled. I am able to ssh from my Mac to Windows successfully but when I try the command New-PSSession -HostName xxxx -UserName yyyy I receive the following message after entering my…
oregonduckman
  • 389
  • 2
  • 13
10
votes
2 answers

Import-PSSession : Proxy creation has been skipped for '%' command, because PowerShell couldn't verify its name as safe

I have a Sharepoint farm setup and I'm connecting to one of my application/search servers from a Windows 7 machine in the domain using remote powershell. Both the client and application servers have powershell 2 with the execution policy set to…
Nicholas J. Markkula
  • 1,542
  • 4
  • 18
  • 30
9
votes
2 answers

PowerShell Remoting to a Workgroup Computer

I'm trying to remote powershell from my domain joined PC to a server in our DMZ but I cannot figure out how to get it working. The DMZ server has a listener configured for HTTP on the default port 5985 that is enabled. The two NIC's in the machine…
Martin
  • 503
  • 1
  • 6
  • 20
9
votes
4 answers

Powershell remoting with V1

Do you know of any good remoting solutions using powershell V1 (I know the V2 stuff is awesome, but my organization doesn't like using pre-release software). I don't need anything spectactular, just a way to kick off powershell script on another…
Mike Shepard
  • 17,466
  • 6
  • 51
  • 69
9
votes
2 answers

"Access Is Denied" error when attempting to remote to Exchange server on localhost

I am attempting to establish a PowerShell session to run several Exchange commands against an Exchange server on the localhost. I keep getting the following error: New-PSSession : [] Connecting to remote server failed with the…
9
votes
1 answer

PowerShell Remoting $Using variable scope

I have folder c:\test where I have three files: “file1”, “file2”, “file3” Following script: $remoteSession = New-PSSession -ComputerName localhost $folder = "c:\test" $exclude =@("c:\test\file1","c:\test\file2") Invoke-Command -Session…
user3884425
  • 91
  • 1
  • 1
  • 6
9
votes
2 answers

Powershell: Issue with & in scriptblock

I face an issue when I run the following command $x = "c:\Scripts\Log3.ps1" $remoteMachineName = "172.16.61.51" Invoke-Command -ComputerName $remoteMachineName -ScriptBlock {& $x} The expression after '&' in a pipeline element produced an invalid…
user2622678
  • 393
  • 1
  • 7
  • 17
9
votes
2 answers

How can I add color to the machine name in the prompt of a PowerShell Remoting session?

To make it more obvious when I'm remoted to a live/production server, I thought it'd be handy to be able to colour the machine name I'm connected to when using remote PowerShell sessions. However, I can't see a way to do this... The server name…
Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
9
votes
5 answers

How to get free physical memory of remote computer using PowerShell

I have this: (Get-WMIObject Win32_logicaldisk -computername computer).TotalPhysicalMemory to get size of physical memory installed on remote computer. How do I get the FREE memory of that computer? I've tried (Get-WMIObject Win32_logicaldisk…
culter
  • 5,487
  • 15
  • 54
  • 66
9
votes
1 answer

Checks about WinRM service in remote machine

I have seen great article PowerShell 2.0 remoting guide: Part 8 – remoting scenarios and troubleshooting http://www.ravichaganti.com/blog/?p=1181 I have this issue: I have two computers in domain, in network. First Test OK: Remoting to a computer in…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
8
votes
1 answer

Powershell, remote script access denied to network resources

I am trying to execute powershell script remotely using invoke-command. The script relies on a configuration file which is available over the local network. The script is called in a following way: Invoke-Command -ComputerName 192.168.137.181…
Szymon Kuzniak
  • 848
  • 1
  • 6
  • 16
8
votes
3 answers

Powershell Get-Service detailed "DESCRIPTION" of the Windows Service

Is there a way to get the detailed "DESCRIPTION" of the Service? The below cmdlet can provide all of the properties of Windows Service including display name but it is not getting the "Description" Get-Service | select -Property * | Out-GridView
1 2
3
82 83