...
Run the following commands to trust the PSGallery:
Code Block | ||
---|---|---|
| ||
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted |
Run the following commands to define the names of the Azure PowerShell module collection and of any modules that are a dependency for other modules the collection:
...
Code Block | ||
---|---|---|
| ||
$Modules, $DependencyModules$Dependencies = (Get-Module -Name "$PowerShellModuleName.*").Where({$_.Name -notin $DependsOnModuleNames},[System.Management.Automation.WhereOperatorSelectionMode]::Split) |
...
Code Block | ||
---|---|---|
| ||
$Modules | ForEach-Object { Remove-Module -Name $_.Name -Force }; $DependencyModules$Dependencies | ForEach-Object { Remove-Module -Name $_.Name -Force } |
...