Skip to content

Instantly share code, notes, and snippets.

@gpduck
Created March 4, 2017 17:59
Show Gist options
  • Save gpduck/1cdc1c7c1083da829ac6e7b0268f9c6e to your computer and use it in GitHub Desktop.
Save gpduck/1cdc1c7c1083da829ac6e7b0268f9c6e to your computer and use it in GitHub Desktop.
$RemoteComputer = "remotecomputer"
Invoke-Command -Computer $RemoteComputer -ScriptBlock { import-module bitstransfer; get-module bitstransfer; }
$S = New-PSSession -Computer $RemoteComputer
Invoke-Command -Session $S -ScriptBlock { Import-Module bitstransfer}
Invoke-Command -Session $S -ScriptBlock { get-Module bitstransfer}
Remove-PSSession $S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment