Deploying Dot Net framework on multiple machines

rated by 0 users
This post has 2 Replies | 2 Followers

Top 200 Contributor
Posts 12
raghavendra.ts Posted: 01-10-2012 7:14 AM

Hello,

I have got a task to install Dot Net 4 framework on more than 50 systems. I am planning to automate it using power shell. But when I try to call the dotnet setup from PS script through invoke-command it is failing to install on remote machines. But I can run the same command on local box. here is the command I am using in script.

 

invoke-command -computername "test" -authentication credssp -scriptblock{cmd /c "C:\dotNetFx40_Full_x86_x64.exe" /passive /norestart /wait /Log "c:\Dotnet4installlog.txt"} -credential "user"

This is initiating the installation on remote box but terminating after Dotnet setup files extraction.

Its really helpfull if anybody knows any other method to acheive it.

Thanks.

Top 10 Contributor
Posts 640

You're likely running into the "second hop" problem, meaning your delegated credential can't be further delegated on the same machine. Punch in "powershell remoting second hop" to Google and the first 4 or 5 hits should be helpful. I see you're using CredSSP; make sure the other necessary steps have been done, also.

It's also possible you're just losing the session because a process terminates. Try opening a session using New-PSSession, and then invoking commands against that session instead of the computer name. You can close the session when you're done. 

Also keep in mind that a GPO, or WSUS, is really the right way to do this... using PowerShell as a software deployment mechanism is, well, a bit of a hack. 

Top 200 Contributor
Posts 12

Thanks Don for your assistance. I verified that all necessary steps have been taken care for credssp. Today I tried to create a session and invoke Dot net through session on remote machine as you suggested. But it didn't work. Dot net log is stopping the installation in between by throwing the below error.

 

Exe (C:\597df651e927d93347dd\Windows6.1-KB958488-v6001-x64.msu) failed with 0x5 - Access is denied.
.
PerformOperation on exe returned exit code 5 (translates to HRESULT = 0x5)
Error 0x5 is mapped to Custom Error:
OnFailureBehavior for this item is to Rollback.
Sending Manifest Report
Final Result: Installation failed with error code: (0x00000005), "Access is denied.
" (Elapsed time: 0 00:00:07).

 

Since Dot net is a pre requisite for installing our application. It has to be included in the PS script which we have created for Application deployment. So I have to get it done by using PS script only.

 

Please share with me if anybody had done Dotnet remote deployment using PS.

 

Thanks.

Page 1 of 1 (3 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.