Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set-Item wsman:localhostClientTrustedHosts -value *
- $username = 'jason'
- $pass = ConvertTo-SecureString -string 'Password' -AsPlainText -Force
- $cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist $username, $pass
- $s = New-PSSession -ConnectionUri 'http://13.xx.xx.89:5985' -Credential $cred -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck)
- Invoke-Command -Session $s -ScriptBlock {get-process}
Add Comment
Please, Sign In to add comment