“Iniciar PowerShell como un usuario diferente” Código de respuesta

Iniciar PowerShell como un usuario 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 PowerShell como un usuario diferente

start powershell -credential ""
Confused Centipede

Respuestas similares a “Iniciar PowerShell como un usuario diferente”

Preguntas similares a “Iniciar PowerShell como un usuario diferente”

Más respuestas relacionadas con “Iniciar PowerShell como un usuario diferente” en Shell/Bash

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código