5 PowerShell Gallery modules for Windows Server Administration

PowerShell Gallery contains lots of modules that you can add to a deployment to make it easier to manage. In this article, I'll cover a few of the ones I've found most useful over the years when it comes to managing .

Before you can install any of these modules, you need to install the NuGet package provider with:

Install-PackageProvider -Name NuGet -Force

The next step is to install the PowerShellGet for module installation using:

Install-Module -Name PowerShellGet -Force

Or, if you have it already installed, ensure that it is up to date with:

Update-Module -Name PowerShellGet

You can learn more about PowerShellGet at: https://docs.microsoft.com/en-us/powershell/module/powershellget/?view=powershell-7.1?WT.mc_id=modin…

Now that you've got the necessary bits in place, here are the five modules I recommend:

1: PSWindowsUpdate.

Use this module to manage Windows Updates from PowerShell (functionality that I'm endlessly surprised isn't there in the base operating system). Especially useful if you're working with Server Core machines and you don't want to use sconfig.cmd to install software updates.

Install using:

Install-Module -Name PSWindowsUpdate

Notable cmdlets include:

  • Add-WUServiceManager
  • Enable-WURemoting
  • Get-WindowsUpdate
  • Get-WUApiVersion
  • Get-WUHistory
  • Get-WUInstallerStatus
  • Get-WUJob
  • Get-WULastResults
  • Get-WURebootStatus
  • Get-WUServiceManager
  • Get-WUSettings
  • Invoke-WUJob
  • Remove-WindowsUpdate
  • Remove-WUServiceManager
  • Set-WUSettings
  • Update-WUModule
  • Set-PSWUSettings
  • Reset-WUComponents
  • Get-WUOfflineMSU

You can learn more about this module at: https://www.powershellgallery.com/packages/PSWindowsUpdate/

2: Package Management

Use this module to install software packages using PowerShell in a manner reminiscent of apt-get or Chocolatey.
Install using:

Install-Module -Name PackageManagement

Notable cmdlets include:

  • Find-Package

  • Get-Package

  • Get-PackageProvider

  • Get-PackageSource

  • Install-Package

  • Import-PackageProvider

  • Find-PackageProvider

  • Install-PackageProvider

  • Register-PackageSource

  • Set-PackageSource

  • Unregister-PackageSource

  • Uninstall-Package

  • Save-Package

You can learn more about this module at:

3. PSLogging

Use this module to manage log files for PowerShell .
Install using:

Install-Module -Name PSLogging

Notable cmdlets/functions:

  • Start-Log
  • Write-LogInfo
  • Write-LogWarning
  • Write-LogError
  • Stop-Log
  • Send-Log

You can learn more about this module at: https://www.powershellgallery.com/packages/PSLogging/2.5.2

4. Invoke-CommandAs

This module allows you to invoke commands as a specific user or as system on either the local or remote computers through ScheduleTask.
Install using:

Install-Module -Name Invoke-CommandAs

Notable cmdlets/functions

  • Invoke-CommandAs

You can learn more about this module at:


5.0 IISAdministration

This module allows you to manage Internet Information Server using PowerShell.

Install using:

Install-Module -Name IISAdministration

Notable cmdlets/functions

  • Get-IISAppPool
  • Start-IISCommitDelay
  • Stop-IISCommitDelay
  • Get-IISSite
  • Remove-IISSite
  • New-IISSite
  • Stop-IISSite
  • Start-IISSite
  • Get-IISConfigSection
  • Get-IISConfigCollection
  • Get-IISConfigCollectionElement
  • New-IISConfigCollectionElement
  • Remove-IISConfigCollectionElement
  • Remove-IISConfigElement
  • Clear-IISConfigCollection
  • Get-IISConfigElement
  • Get-IISConfigAttributeValue
  • Remove-IISConfigAttribute
  • Set-IISConfigAttributeValue
  • Get-IISServerManager
  • Reset-IISServerManager
  • Get-IISCentralCertProvider
  • Set-IISCentralCertProvider
  • Set-IISCentralCertProviderCredential
  • Clear-IISCentralCertProvider
  • Disable-IISCentralCertProvider
  • Enable-IISCentralCertProvider
  • Enable-IISSharedConfig
  • Disable-IISSharedConfig
  • Export-IISConfiguration
  • Get-IISSharedConfig
  • Get-IISSiteBinding
  • Remove-IISSiteBinding
  • New-IISSiteBinding

You can learn more about this module at: https://www.powershellgallery.com/packages/IISAdministration/


This article was originally published by Microsoft's Core Infrastructure and Security Blog. You can find the original article here.