Administering Remote Computers
Admin operations on remote computers using PowerShell
#Find command
Get-Command -Module ChangeMe
#help Command
Help changeMeSet-ExecutionPolicy RemoteSignedEnable-PSremotinghelp *sessionconfiguration*
<# use code below to view the session configs of the PC#>
Get-PSSessionConfigurationEnter-PSSession -ComputerName "PC_NAME"
#Make the connection persistent
$sessionOption = New-PSSessionOption -IdleTimeout 86400 # Set an idle timeout of 24 hours (86400 seconds)
$PcConn = New-PSSession –ComputerName 'PC_Here' -SessionOption $sessionOption
#To verify connectivity type the variable name and it will provide the connection session
$PcConn
Last updated