خرید بک لینک

Vote count: 0

I pulled this from another question, but I caot seem to make this work.

I'm needing to run this .bat file as a local admin account. I want users to be able to run and install this without having local admin rights.

I'm not sure what's wrong though. Thanks in advance for help.

$useame = 'localadmin'
$password = 'passwordforlocaladmin'
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential     $useame, $securePassword
Start-Process -filepath "p:kaceInstallerkaceinstall3.bat" -Credential   $credential

The error I'm getting back is:

Start-Process : This command caot be executed due to the error: The directory name is invalid. At P:kaceInstallermisckaceSetup.ps1:7 char:14 + Start-Process <<<< cmd -Credential $credential + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOp erationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.C ommands.StartProcessCommand

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 26 اسفند 1394 ساعت: 3:16

صفحه بندی