- Invoke-Command -ComputerName $computerName -ArgumentList "/q /norestart" -ScriptBlock {Start-Process -FilePath 'C:\tmp\ndp48-x86-x64-allos-enu.exe' $args[0] }
.net remote install
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
.net remote install
This may have been answered already but cant seem to find on this forum. I am trying to install .net 4.8 to remote machines. I am using the below but it seems like it is not working. The funny thing I am not getting error at all it is just not working. I have used this command for other process runs. Is it possible to install .net framework like this?
Re: .net remote install
That's the thing I am not getting an error. It just run and comes back . I even tried to run it locally and I just get the below as well with Passthru. No errors at all weird.
and i just get this
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
57 7 1204 4348 0.02 224 4 ndp48-x86-x64-allos-enu
- Invoke-Command -ArgumentList "/q /norestart" -ScriptBlock {Start-Process -FilePath 'C:\tmp\ndp48-x86-x64-allos-enu.exe' -ArgumentList $args[0] -Wait -PassThru}
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
57 7 1204 4348 0.02 224 4 ndp48-x86-x64-allos-enu
Re: .net remote install
This is the .net installer. Why would it not work? will it be better I guess to put in a bat file. Hate to do that but will if have to.
Re: .net remote install
Why do you think a batch file will help. The issue is that installer EXE files run and start teh system installer. Most just terminate before the install is complete. Exiting the session will just terminate the installer. Either keep the session open until the installer quits or use a pre existing session.
If the installer cannot run silent then the installer may hang with no way to know it is hung. You must contact the vendor to know if this is possible.
If the installer cannot run silent then the installer may hang with no way to know it is hung. You must contact the vendor to know if this is possible.
Re: .net remote install
Ok figured out that this script actually works. Needs a restart to be fully install. Just added restart and registry check for the version. lol realized that I have norestart arg and needed to remove it.
Re: .net remote install
Have a quick question how can I not make the not path static? I tried the using: but it seems to not work. Invoke-Command does not see the path.
- $path = 'C:\classInstalls\ndp48-x86-x64-allos-enu.exe'
- Invoke-Command -ComputerName $computerName -ArgumentList "/q /norestart" -ScriptBlock { Start-Process -FilePath using:$path $args[0] }
Re: .net remote install
$path = 'C:\classInstalls\ndp48-x86-x64-allos-enu.exe'
Invoke-Command -ComputerName $computerName -ArgumentList "/q /norestart" -ScriptBlock { Start-Process -FilePath using:$path $args[0] -WorkingDirectory ?????????? }
Do you need to include a WorkingDirectory?
Invoke-Command -ComputerName $computerName -ArgumentList "/q /norestart" -ScriptBlock { Start-Process -FilePath using:$path $args[0] -WorkingDirectory ?????????? }
Do you need to include a WorkingDirectory?