Skip to content

Instantly share code, notes, and snippets.

@kkamegawa
Last active February 9, 2025 21:15
Show Gist options
  • Save kkamegawa/f2c57b75e88e5950e4f525ebbaa2963f to your computer and use it in GitHub Desktop.
Save kkamegawa/f2c57b75e88e5950e4f525ebbaa2963f to your computer and use it in GitHub Desktop.
Sync az module from folder path
$mydocuments = [System.Environment]::GetFolderPath("mydocuments")
$azpath = join-path $mydocuments -childpath PowerShell Modules Az
$versions = get-childItem $azpath | select name
foreach($ver in $versions) {
write-host "version:" + $ver.name
install-module -Name az -RequiredVersion $ver.name -AllowClobber -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment