2017-10-06 8 views
0

& powershell.exeの実行中に起動プロセスのアクセス拒否エラーが発生しました。Azure Powershell Start-Process:エラーが発生したため、このコマンドは実行できません。アクセスが拒否されました。

$username = "domain\username" 

$password = "Welcome1234$" 

$PSArgs = "D:\test.ps1" 

$securePassword = ConvertTo-SecureString $password -AsPlainText -Force 

$credential = New-Object System.Management.Automation.PSCredential $username, 

$securePassword 

Start-Process Powershell.exe -Credential $credential $PSArgs 

エラー:

Start-Process : This command cannot be executed due to the error: Access is denied 
Start-Process : This command cannot be executed due to the error: Access is denied. 
At C:\Windows\system32\config\systemprofile\AppData\Local\Temp\PRISMA-AMR-JOB1-87-ScriptBuildTask-8569094554411403512.ps1:38 char:18 
+  Start-Process <<<< C:\Windows\System32\cmd.exe -arg "/C" -Credential $credential + CategoryInfo   : InvalidOperation: (:) [Start-Process], InvalidOperationException 
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand 

答えて

0

Start-Process : This command cannot be executed due to the error: Access is denied. At C:\Windows\system32\config\systemprofile\AppData\Local\Temp\PRISMA-AMR-JOB1-87-ScriptBuildTask-8569094554411403512.ps1:38 char:18

このエラーコードによると、あなたがローカルコンピュータポリシーにユーザー「ドメイン\ユーザー名」を追加していないようだ - > [ユーザー権利の割り当て。

enter image description here

詳しい情報についてユーザー権利の割り当て、このlinkを参照してください。

また、ここでも同様のケースについては、itを参照してください。

、コマンドプロンプトで、または検索では、ローカルグループポリシーを開くタイプgpedit.msc、[OK]をクリックしますかENTERを押します。

+0

ドメインユーザーには、ローカルポリシー "認証後にクライアントに偽装"が既に追加されています。 – hans

+0

@hans提供された情報が役立ったかどうかをチェックするだけです。さらなる支援をご希望の場合はお知らせください。 –

+0

@hansでは、ドメインユーザーでこのスクリプトを実行できますか? –

関連する問題