Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $befehl="get-random -maximum 2"
- $username = "user1"
- $password = 'mypass'
- $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
- $credential = New-Object System.Management.Automation.PSCredential $username, $securePassword
- Invoke-Command -ComputerName 192.168.26.163 -Credential $credential -ScriptBlock {(invoke-expression $befehl)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement