From ff156c815bfb76edbb896738332de43c70ecf29a Mon Sep 17 00:00:00 2001 From: Dan Franciscus Date: Wed, 10 Jul 2019 12:05:44 -0400 Subject: [PATCH] Fixed more help and added Demo for Start-ChocoRemoteMgmt --- CHANGELOG.md | 5 +++++ Chocolatey-tools.psd1 | 2 +- Examples/Demo-Start-ChocoRemoteMgmt.MD | 13 +++++++++++++ functions/Start-ChocoRemoteMgmt.ps1 | 10 ++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Examples/Demo-Start-ChocoRemoteMgmt.MD diff --git a/CHANGELOG.md b/CHANGELOG.md index bed267b..2bfe107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Chocolatey-tools Release History +## 0.4.7 - 7/10/2019 + +### Fixed + +* Help stuff ## 0.4.5 - 7/10/2019 diff --git a/Chocolatey-tools.psd1 b/Chocolatey-tools.psd1 index 2121420..564f852 100644 --- a/Chocolatey-tools.psd1 +++ b/Chocolatey-tools.psd1 @@ -12,7 +12,7 @@ RootModule = 'Chocolatey-tools.psm1' # Version number of this module. -ModuleVersion = '0.4.6' +ModuleVersion = '0.4.7' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/Examples/Demo-Start-ChocoRemoteMgmt.MD b/Examples/Demo-Start-ChocoRemoteMgmt.MD new file mode 100644 index 0000000..2b017ec --- /dev/null +++ b/Examples/Demo-Start-ChocoRemoteMgmt.MD @@ -0,0 +1,13 @@ +The Start-ChocoRemoteMgmt function launches a Winform PowerShell GUI for installing, uninstall, upgrading, viewing Chocolatey packages on remote clients. It can also be used to see current logged on users and reboot machines. + +Note that the GUI will freeze when it is performing an action. The output will be displayed when it is finished. The list box of computers also does autocomplete, which is nice when you have a lot of computers. + +### Prerequisites: +- Invoke-CommandAs PowerShell community module (Used for running scheduled tasks as SYSTEM) +- Chocolatey installed on remote machines + +Here I use Active Directory to get a list of all computers which will populate the computer list in the GUI. I also use the function Get-ChocoSourcePackages to get all of the packages from my the local sources I have configured in Chocolatey. Note that it will only get unique package names. +``` +Start-ChocoRemoteMgmt -ComputerName (Get-ADComputer -Filter * | Select-Object -ExpandProperty Name) -Packages (Get-ChocoSourcePackages -Packages myrepo1,myrepo2,myrepo3) +``` + diff --git a/functions/Start-ChocoRemoteMgmt.ps1 b/functions/Start-ChocoRemoteMgmt.ps1 index 170de79..914ec0f 100644 --- a/functions/Start-ChocoRemoteMgmt.ps1 +++ b/functions/Start-ChocoRemoteMgmt.ps1 @@ -9,6 +9,16 @@ function Start-ChocoRemoteMgmt { We also use the function Get-ChocoSourcePackages to pull all packages from Chocolatey sources configured on the local computer. Start-ChocoRemotemgmt -ComputerName (Get-ADComputer -Filter | Select-Object -ExpandProperty Name) -Packages (Get-ChocoSourcePackages -Sources repo1,repo2) + + Button actions: + + Reboot - Will prompt for confirmation and reboot the computer shown in Computer Name. + Show Current User - Show the current logged on user for remote computer. + Show Outdated - Show what Chocolatey packages are outdated on the remote machine. + Install - Install a Chocolatey package that is selected from the Packages list on the remote computer. + Upgrade - Upgrade a Chocolatey package that is selected from the Packages list on the remote computer. + Unistall - Upgrade - Uninstall a Chocolatey package that is selected from the Packages list on the remote computer. + Show Installed - Show what Chocolatey packages and versions are installed on remote computer. #> [CmdletBinding()] param (