< Back

Get-ModuleUpdates

Sun Jan 19, 2020 5:53 pm

NAME Get-ModuleUpdates



SYNOPSIS

Check powershell modules for updates





SYNTAX

Get-ModuleUpdates [[-module] <String>] [-skipUpdate <String>] [-schedTaskScriptPath <String>]

[-schedTaskTranscriptPath <String>] [-Scope <String>] [-ScopeCore <String>] [-update] [-all] [-sendToast]

[-createSchedTask] [-createSchedTaskWithTranscript] [-allowPrerelease] [-skipScan] [-getLastUpdateCommand]

[-compressTranscriptDir] [<CommonParameters>]





DESCRIPTION

Check powershell modules for updates





PARAMETERS

-module <String>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-skipUpdate <String>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-schedTaskScriptPath <String>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-schedTaskTranscriptPath <String>



Required? false

Position? named

Default value "$env:USERPROFILE\\.ps.checkModuleUpdate\\Transcripts"

Accept pipeline input? false

Accept wildcard characters? false



-Scope <String>



Required? false

Position? named

Default value AllUsers

Accept pipeline input? false

Accept wildcard characters? false



-ScopeCore <String>



Required? false

Position? named

Default value CurrentUser

Accept pipeline input? false

Accept wildcard characters? false



-update [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-all [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-sendToast [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-createSchedTask [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-createSchedTaskWithTranscript [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-allowPrerelease [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-skipScan [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-getLastUpdateCommand [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-compressTranscriptDir [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Check-ModuleUpdates



Check imported modules for updates









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Check-ModuleUpdates -all



Check all available modules for updates









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Check-ModuleUpdates PowershellGet -all



Check module PowershellGet for updates









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Check-ModuleUpdates -update -skipUpdate "PSReadLine"



Will update all imported modules except module PSReadLine









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>"scour|PSWindowsUpdate|Pscx" | cmu -allowPrerelease -update -skipScan



Will update modules "scour|PSWindowsUpdate|Pscx" with no scan of installed module versions









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>cmu "scour|PSWindowsUpdate|Pscx" -allowPrerelease -update -skipScan



Will update modules "scour|PSWindowsUpdate|Pscx" with no scan of installed module versions









-------------------------- EXAMPLE 7 --------------------------



PS C:\\>Check-ModuleUpdates PackageManagement -all -update



Will check and update module PackageManagement









-------------------------- EXAMPLE 8 --------------------------



PS C:\\>Check-ModuleUpdates -all -update



Will try to update all available modules









-------------------------- EXAMPLE 9 --------------------------



PS C:\\>Check-ModuleUpdates -createSchedTask



Will create scheduled task to run the script every Friday at 5am. SchedTask will be created for powershell

edition, the command was ran from









-------------------------- EXAMPLE 10 --------------------------



PS C:\\>cmu -createSchedTaskWithTranscript



Will create scheduled task with transcript enabled









-------------------------- EXAMPLE 11 --------------------------



PS C:\\>cmu -getLastUpdateCommand



Get latest module update command from the transcript file, created by scheduled task









-------------------------- EXAMPLE 12 --------------------------



PS C:\\>cmu -getLastUpdateCommand | iex



Run latest module update command









-------------------------- EXAMPLE 13 --------------------------



PS C:\\>Check-ModuleUpdates -all -update -skipUpdate "PSReadLine|PSWindowsUpdate"



Will update all modules available except modules PSReadLine and PSWindowsUpdate









-------------------------- EXAMPLE 14 --------------------------



PS C:\\>Check-ModuleUpdates -all -skipUpdate "VMware.VimAutomation.Srm|VMware.VimAutomation.Storage"



For PowerCLI, only VMware.PowerCLI should be installed









-------------------------- EXAMPLE 15 --------------------------



PS C:\\>Check-ModuleUpdates -allowPrerelease -all



Will check also prerelease versions









-------------------------- EXAMPLE 16 --------------------------



PS C:\\>Check-ModuleUpdates -allowPrerelease -update "PSReadLine"



Will update PSReadLine to higher prerelease









-------------------------- EXAMPLE 17 --------------------------



PS C:\\>Check-ModuleUpdates -all -sendToast



Will check all modules for updates and send toast notification to Action center









-------------------------- EXAMPLE 18 --------------------------



PS C:\\>cmu -compressTranscriptDir



Will set compression attribute to log/transcript directory ($env:USERPROFILE\\.ps.checkModuleUpdate)











RELATED LINKS