“Start PowerShell как другого пользователя” Ответ

Start PowerShell как другого пользователя

$user = "domain\service.account" 
$pwd1 = "big long huge string of characters"
$pwd = ($pwd1 | ConvertTo-SecureString)
$Credential = New-Object System.Management.Automation.PSCredential $user, $pwd
$args = "\\domain.local\location\location\location\Script\script.ps1"
Start-Process powershell.exe -Credential $Credential -ArgumentList ("-file $args")
Confused Centipede

Start PowerShell как другого пользователя

start powershell -credential ""
Confused Centipede

Ответы похожие на “Start PowerShell как другого пользователя”

Вопросы похожие на “Start PowerShell как другого пользователя”

Больше похожих ответов на “Start PowerShell как другого пользователя” по Shell/Bash

Смотреть популярные ответы по языку

Смотреть другие языки программирования