July 2018
Beginner
552 pages
13h 18m
English
Since there is no automatic update process, you can go about this in multiple ways. The easiest solutions for most are scheduled tasks and $profile. This process essentially involves executing the Update-Module cmdlet:
# Automating updates# Scheduled Tasks: Windows PowerShell style# ScheduledJobs are also working, if you need the additional output$parameters = @{ TaskName = 'PowerShellModuleUpdate' TaskPath = '\KRAFTMUSCHEL' Trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME Action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-WindowStyle Hidden -Command "{Get-InstalledModule | Update-Module}"' Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -RunOnlyIfNetworkAvailable}Register-ScheduledTask ...Read now
Unlock full access