Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = "administrator"
- $password = "your-super-secret-password"
- $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
- $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $securePassword
- $pstimeout = New-PSSessionoption -OperationTimeout (1000*60*5)
- $session = New-PSSession -computer $ipAddress -Credential $cred -ErrorAction Stop -SessionOption $pstimeout
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement