windows execute powershell script define user
$username = "DOMAIN\User"
$password = "Password"
$secstr = New-Object -TypeName System.Security.SecureString
$password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr
Invoke-Command -FilePath "C:\Script\To\Execute.ps1" -Credential $cred -Computer localhost
Also in C++:
- centos selinux set permissive
- debian install sbatch
- invokemethodonnull powershell try catch
- mongo shell query for email domain regex
- vim replace multiple lines
- bcftools view sample info
- Git blame
- how to set global github username and password in git
- where is tetris in linux terminal
- kill port linux
- install docker on wsl
- windows cat grep equivalent
- how to install flash
- command to check size of folder in linux
- how to check folder size in linux
- upgrade shell tty
- ubuntu top bar hide
- best photo editor linux
- github remove a file from a commit
- linux date command live update
- rename a.out
- rename file powershell
- find java home
- ubuntu 19.10 eoan update error