File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 4
4
[string ] $StorageContainerName = ' public-vcpkg-container'
5
5
)
6
6
7
- . " $PSScriptRoot /Helpers/PSModule-Helpers.ps1"
8
-
9
- Write-Host " `$ env:PSModulePath = $ ( $env: PSModulePath ) "
10
-
11
- # Work around double backslash
12
- if ($IsWindows ) {
13
- $hostedAgentModulePath = $env: SystemDrive + " \\Modules"
14
- $moduleSeperator = " ;"
15
- }
16
- else {
17
- $hostedAgentModulePath = " /usr/share"
18
- $moduleSeperator = " :"
19
- }
20
- $modulePaths = $env: PSModulePath -split $moduleSeperator
21
- $modulePaths = $modulePaths.Where ({ ! $_.StartsWith ($hostedAgentModulePath ) })
22
- $AzModuleCachePath = (Get-ChildItem " $hostedAgentModulePath /az_*" - Attributes Directory) -join $moduleSeperator
23
- if ($AzModuleCachePath -and $env: PSModulePath -notcontains $AzModuleCachePath ) {
24
- $modulePaths += $AzModuleCachePath
25
- }
26
-
27
- $env: PSModulePath = $modulePaths -join $moduleSeperator
28
-
29
- Install-ModuleIfNotInstalled " Az.Storage" " 4.3.0" | Import-Module
30
-
31
7
$ctx = New-AzStorageContext `
32
8
- StorageAccountName $StorageAccountName `
33
9
- UseConnectedAccount
You can’t perform that action at this time.
0 commit comments