Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user = "domainservice.account"
- $pwd1 = "big long huge string of characters"
- $pwd = ($pwd1 | ConvertTo-SecureString)
- $Credential = New-Object System.Management.Automation.PSCredential $user, $pwd
- $args = "\domain.locallocationlocationlocationScriptscript.ps1"
- Start-Process powershell.exe -Credential $Credential -ArgumentList ("-file $args")
- start powershell -credential ""
- $username = 'user'
- $password = 'password'
- $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
- $credential = New-Object System.Management.Automation.PSCredential $username, $securePassword
- Start-Process Notepad.exe -Credential $credential
- Start-Process powershell.exe -Credential $Credential -Verb RunAs -ArgumentList ("-file $args")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement