title: Installing Net Framework 4 Remotely as an Administrator
body: <p>I am trying to install the .net framework 4.0 remotely using the following commands</p>
  <h1>1</h1>
  <pre><code>command =&gt; 'Powershell.exe -Verb RunAs -FilePath C:\Temp\dotNetFx40_Full_setup.exe -ArgumentList &quot;/q /norestart /log C:\Temp\NetFx40.htm&quot;'
  </code></pre>
  <h1>2</h1>
  <pre><code>command =&gt; 'C:\Windows\System32\cmd.exe /c C:\Temp\dotNetFx40_Full_setup.exe /q /norestart /log C:\Temp\NetFx40.htm',
  </code></pre>
  <p>With both i get the following in the logs.  Btw the user running the command is a member of the Local Administrators Group.</p>
  <pre><code>Final Result: Installation failed with error code: (0x00000005), &quot;Access is denied. &quot; (Elapsed time: 0 00:00:55).
      OS Version = 6.1.7601, Platform 2, Service Pack 1
      OS Description = Win2K8R2 - x64 Standard Edition Service Pack 1
      CommandLine = D:\ecfcf956d61e2bf89c1c75ce16\\Setup.exe /q /norestart /log C:\Temp\NetFx40.htm /x86 /x64 /ia64 /web
      TimeZone = Eastern Standard Time
      Initial LCID = 1033
      Using Simultaneous Download and Install mechanism
      Operation: Installing
      Package Name = Microsoft .NET Framework 4 Setup
      Package Version = 4.0.30319
      User Experience Data Collection Policy: Disabled
      Number of applicable items: 11
      Exe (D:\ecfcf956d61e2bf89c1c75ce16\SetupUtility.exe) succeeded.
      Exe Log File: dd_SetupUtility.txt
      ServiceControl operation succeeded!
      ServiceControl operation succeeded!
      Exe (C:\Users\_BUILD~1\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x64.msu) failed with 0x5 - Access is denied. .
      Final Result: Installation failed with error code: (0x00000005), &quot;Access is denied. &quot; (Elapsed time: 0 00:00:21).
  </code></pre>