

In this case, I want to get the status of the User Profile Service on every machine in Active Directory: $Computers = Get-ADComputer -Filter * | Select-Object -ExpandProperty Name The ScriptBlock parameter is obviously a block of code you want to run. The ComputerName parameter requires an input of the hostname on which you want to run remote code on. The two main parameters I usually use are ComputerName and ScriptBlock. This cmdlet allows me run remote commands and scripts on many machines at once, which makes it incredibly powerful. One command that I find myself using very often is Invoke-Command. These solutions could be Puppet, Chef and SCCM among many others.

As Chocolatey is best used via its CLI (command line interface) with CMD or PowerShell, there are many different methods one can use to remotely deploy software to client workstations and servers. In this article, I will demonstrate this.Īs I have written previously, Chocolatey is breath of fresh air to Windows sysadmins everywhere, as it allows for a universal way to manage and deploy software in the enterprise. Using PowerShell remoting techniques, software can be deployed in parallel on many different machines at once. One “free” solution for deploying Chocolatey packages remotely is PowerShell.
