“Iniciar o PowerShell como usuário diferente” Respostas de código

Iniciar o PowerShell como usuário diferente

$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

Iniciar o PowerShell como usuário diferente

start powershell -credential ""
Confused Centipede

Respostas semelhantes a “Iniciar o PowerShell como usuário diferente”

Perguntas semelhantes a “Iniciar o PowerShell como usuário diferente”

Mais respostas relacionadas para “Iniciar o PowerShell como usuário diferente” em Shell/Bash

Procure respostas de código populares por idioma

Procurar outros idiomas de código