Set-ExecutionPolicy RemoteSigned
in order for the SPE Remoting module will run. This typically requires elevated privileges.-Credential
parameter which is common when logged into a Windows Active Directory domain.Invoke-RemoteScript
you can use the following list of commands.Get-ScriptSession
- Returns details about script sessions.Receive-ScriptSession
- Returns the results of a completed script session.Remove-ScriptSession
- Removes the script session from memory.Start-ScriptSession
- Executes a new script session.Stop-ScriptSession
- Terminates an existing script session.Wait-ScriptSession
- Waits for all the script sessions to complete before continuing.ScriptSession
and polls the server until completed.ScriptSession
objects.Write-Verbose
to the remote session. The data returned will be both System.String
and Deserialized.System.Management.Automation.VerboseRecord
so be sure to filter it out when needed. More information about the redirection 4>&1
can be read here.Microsoft.PowerShell.Commands
instead of Spe
or similar):Set-Location -Path "master:"
FileSystem
provider. Changing the location activates the custom provider included with SPE. As part of the custom provider there are additional parameters added to commands native to PowerShell.