Saturday, August 29, 2015

Multiple ways to Install Software remotely on Windows - Method 5 Powershell Remoting

Multiple ways to Install software remotely
Multiple ways to Install Software remotely on Windows - Method 1 Group Policy
Multiple ways to Install Software remotely on Windows - Method 2 Third party softwares

Multiple ways to Install Software remotely on Windows - Method 3 Command line PSEXEC tool
Multiple ways to Install Software remotely on Windows - Method 4 WMI (Windows Management Instrumentation)
Multiple ways to Install Software remotely on Windows - Method 5 PowerShell Remoting
Multiple ways to Install Software remotely on Windows - Method 6 PowerShell DSC (Desired State Configuration)
Multiple ways to Install Software remotely on Windows - Method 7 Copy Portable applications 
Multiple ways to Install Software remotely on Windows - Method 8 Task scheduler 

In this article I will be covering remote installation using powershell. Powershell is windows scripting tool and may replace cmd (Command prompt) gradually over the time. Powershell has remoting feature as same as ssh in linux. Powershell uses WS-Manangement protocol to connect remotely, and it need to be enabled on remote server (as same as remote desktop).

Requirement is both the server and client should have powershell installed. below steps done to enable psremoting.

Start PowerShell as administrator and fire below command.

Enable-PSRemoting 

Basically it does below main things  
Start WinRM service (Windows Remote Management (WS-Management)), set to auto automatic start. Add any hosts * in the listeners (clients) list (any computers in the same domain can connect over WINRM protocol), and the last thing is to enable firewall exception for WS-management traffic. 

Type couple of Y to agree all the required changes. This need to be setup on remote server. And you are ready to connect.

In this section I will be using SCCM client to install remotely, as usual it is located on shared drive, From any other server open powershell, Go with the below command. Line in the bold is invoke-command (to execute command remotely) and you will need to replace hostname according to your need (provide netbios name only, To work IP address correctly you will need to add ips to trusted host list.),  In the curly brackets I have executed SCCM client kept on shared drive, ccmsetup.exe with its parameters pointing toward site code and other info.

Invoke-Command -ComputerName Client001 -Command {\\ad001\Softwares\SCCMClient\CCMSetup.exe /mp:SMSMP01 /logon SMSSITECODE=S01 FSP=SMSFSP01}

Here you are done and you can check on the remote server for Installed application. 
There are more methods I will be addressing in my next articles.

Next is Powershell DSC Desire state configuration to install software remotely in line.
Method 6 PowerShell DSC (Desired State Configuration) install software remotely.

3 comments:

Unknown said...

Action1 deploys the software without using any specialized software deployment tools and performs similar software installations remotely using wmic, command line tools (for example, if you installed software remotely using psexec) or PowerShell scripts to automatically install software on several computers on the network. https://www.action1.com/p/Free-Install-Software-Remotely-58.html

IShine Trade said...

I am really impressed with your writing skills .keep up the nice quality writing, it’s rare to see a great blog like this one nowadays.
Screen Protector Wholesale

Unknown said...

Nice article admin thanks for share your atricle keep share your knowledge i am waiting for your new post check hi vis jacket girls knee high socks kindly review and reply me