Last active
December 11, 2020 04:54
-
-
Save billkindle/8121cfb8454e529c24e9e54cc5a6a47e to your computer and use it in GitHub Desktop.
I use this small script to occasionally update my most used modules so I can copy them to systems I manage or to a network share.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are moudles that I need to routinely save from the PowerShell Gallery | |
$modules = @("Pester","dbatools","dbachecks","psTrustedHosts","PoshWSUS","PSWindowsUpdate","PSDecode","PoshRSJob","PSFramework", | |
"ScheduledJobTools","WindowsCompatibility","ImportExcel","BurntToast","Invoke-CommandAs","PoshEvents","psbbix","UniversalDashboard.Community") | |
$path = Read-Host -Prompt 'Please enter the full path to which you want to save common modules:' | |
Foreach ($module in $modules) { | |
Save-Module -Name $module -Path $path -AcceptLicense -Force | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment