Top "Powershell-remoting" questions

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.

How to Invoke-Expression to call a function or script with variables?

I get the an invalid path error with this script: $buildZIP= 'starmatic' echo $buildZIP $command = ”\\XXXXXXXXXX\L$\Gopi_Prod_App\…

powershell powershell-remoting
How to access NoteProperties on the InputObject to a remoting session

I'm having difficulty accessing PSObjects with NoteProperties defined, that are being passed through to a remote session via Invoke-Command. The …

powershell powershell-2.0 powershell-remoting
Launching background tasks in a remote session that don't get killed when the session is removed

I have been using PsExec -d to launch console applications in a remote powershell session because I want these apps …

powershell powershell-2.0 psexec powershell-remoting
Run a local function on a remote computer?

I have a simple function on my computer MYPC> $txt = "Testy McTesterson" MYPC> function Do-Stuff($file) { cd c:\…

powershell powershell-remoting
PowerShell ScriptBlock and multiple functions

I have written the following code: cls function GetFoo() { function GetBar() { $bar = "bar" $bar } $foo = "foo" $bar = GetBar $foo $bar } $…

powershell powershell-remoting scriptblock
Powershell Remoting Profiles

How do I use a function in my profile on the remote machine when using Enter-PSSession on my local machine …

powershell powershell-remoting
Using Powershell Invoke-Command on remote session to invoke executable by string

I want to write a Powershell script to invoke an executable on a remote machine by its path and then …

powershell-3.0 powershell-remoting invoke-command
Functional differences between $PSScriptRoot and $MyInvocation

Problem I am working with Jenkins to deploy PowerShell scripts remotely. As such, I am trying to figure out if …

powershell powershell-remoting automatic-variable
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 {&…

powershell powershell-remoting
How to Write-Verbose from Invoke-Command?

In powershell Write-Verbose and the -Verbose flag are used to provide verbose information when commands are run in verbose mode. …

powershell powershell-remoting