Skip to content

Commit b2f3b1c

Browse files
author
maddieclayton
committed
Fix default parameter value in psm1
1 parent 7839f53 commit b2f3b1c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tools/AzureRM.Example.psm1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ $FilteredCommands = %DEFAULTRGCOMMANDS%
3535
if ($Env:ACC_CLOUD -eq $null)
3636
{
3737
$FilteredCommands | ForEach-Object {
38-
if (!$global:PSDefaultParameterValues.Contains($_))
38+
39+
$existingDefault = $false
40+
foreach ($key in $global:PSDefaultParameterValues.Keys)
41+
{
42+
if ($_ -like "$key")
43+
{
44+
$existingDefault = $true
45+
}
46+
}
47+
48+
if (!$existingDefault)
3949
{
4050
$global:PSDefaultParameterValues.Add($_,
4151
{

0 commit comments

Comments
 (0)