Top "Invoke-command" questions

Invoke-Command is a powershell cmdlet that runs commands on local and remote computers.

Invoke-Command in a background job

I have a powershell 2.0 script which should run a command on several servers and process the output. I want to …

powershell invoke-command start-job
Get Java version from PowerShell of remote server

I am trying to write a script in PowerShell that will use the invoke command with credentials on a remote …

java powershell version powershell-remoting invoke-command
Encapsulate the output of invoke command in a variable - PowerShell

I have a script that installs Remote Desktop Services on remote machines (from the DC). I'm now at the phase …

powershell variables scripting invoke-command storing-data
Powershell invoke-command access is denied error - not a double hop

I am building a new network with Server 2016 and a handful of Windows 10 clients. I have run Enable-PSRemoting successfully on …

powershell access-denied invoke-command
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
How to pass string variable to invoke-expression?

I am running the below powershell command: $cmd = "xxx.exe" Invoke-Command -ComputerName localhost {Invoke-Expression $cmd} However I get the error: …

powershell invoke-command
Powershell passing variables to remote script

I have the following cmd file:- PowerShell.exe -noexit E:\wwwroot\domains\processes\AddDirectory.ps1 -Param testdomain.co.uk …

powershell invoke-command
PowerShell Splatting the Argumentlist on Invoke-Command

How is it possible to use the parameters collected in a hash table for use with ArgumentList on Invoke-Command? $CopyParams = @{ …

powershell argument-passing invoke-command
Powershell - capture output from Invoke-Command running exe on remote machine

I need to configure the auditing policy on a collection of remote servers. I'm trying to use the Invoke-Command commandlet …

powershell invoke-command
OutOfMemory Exception on remote execution using Powershell Invoke-Command

I am trying to execute an exe on a remote computer using invoke-command. Executing the exe on the remote machine …

powershell invoke-command remote-execution