Skip to content

Commit 86bf874

Browse files
Merge pull request #197 from mgreenegit/patch-2
SecretManagement module
2 parents e1f5b8f + 02def98 commit 86bf874

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

linux/powershell/Invoke-PreparePowerShell.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ $moduleList = @(
1919
"MicrosoftPowerBIMgmt",
2020
"Az",
2121
"GuestConfiguration",
22-
"Microsoft.PowerShell.UnixCompleters"
22+
"Microsoft.PowerShell.UnixCompleters",
23+
"Microsoft.PowerShell.SecretManagement",
24+
"Microsoft.PowerShell.SecretStore"
2325
)
2426

2527
# set SkipAzInstallationChecks to avoid az check for AzInstallationChecks.json

linux/powershell/setupPowerShell.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ try {
140140
PowerShellGet\Install-Module -AllowPreRelease -Force PSReadLine -Repository PSGallery # get psreadline beta
141141
PowerShellGet\Install-Module -Name Az.Tools.Predictor -Repository PSGallery
142142
PowerShellGet\Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5 -Force
143+
PowerShellGet\Install-Module -Name Microsoft.PowerShell.SecretManagement @prodAllUsers
144+
PowerShellGet\Install-Module -Name Microsoft.PowerShell.SecretStore @prodAllUsers
143145

144146
# With older base image builds, teams 1.1.6 is already installed
145147
if (Get-Module MicrosoftTeams -ListAvailable) {

tests/PSinLinuxCloudShellImage.Tests.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,20 @@ Describe "PowerShell Modules" {
214214
$module | Should -Not -BeNullOrEmpty
215215

216216
}
217+
218+
It "Microsoft.PowerShell.SecretManagement PowerShell Module" {
219+
220+
$module = Get-Module -Name 'Microsoft.PowerShell.SecretManagement' -ListAvailable
221+
$module | Should -Not -BeNullOrEmpty
222+
223+
}
224+
225+
It "Microsoft.PowerShell.SecretStore PowerShell Module" {
226+
227+
$module = Get-Module -Name 'Microsoft.PowerShell.SecretStore' -ListAvailable
228+
$module | Should -Not -BeNullOrEmpty
229+
230+
}
217231

218232
$importModuleTestCases = @(
219233
@{ ModuleName = "Microsoft.PowerShell.Management" }
@@ -226,6 +240,8 @@ Describe "PowerShell Modules" {
226240
@{ ModuleName = "EXOPSSessionConnector" }
227241
@{ ModuleName = "MicrosoftTeams" }
228242
@{ ModuleName = "Microsoft.PowerShell.UnixCompleters" }
243+
@{ ModuleName = "Microsoft.PowerShell.SecretManagement" }
244+
@{ ModuleName = "Microsoft.PowerShell.SecretStore" }
229245
)
230246

231247
It "Import-Module test for <ModuleName>" -TestCases $importModuleTestCases {

0 commit comments

Comments
 (0)