Fix non-functioning NoProfile
argument
This commit is contained in:
parent
f25e892faf
commit
2220ca3138
1 changed files with 6 additions and 8 deletions
|
@ -54,19 +54,17 @@ $null = New-Module {
|
||||||
Remove-Item Env:\PENDING_MODULE_NAME;
|
Remove-Item Env:\PENDING_MODULE_NAME;
|
||||||
};
|
};
|
||||||
|
|
||||||
configurator = {
|
configurator = ($NoProfile.IsPresent) ? { } : {
|
||||||
param(
|
param(
|
||||||
[hashtable] $Arguments
|
[hashtable] $Arguments
|
||||||
)
|
)
|
||||||
|
|
||||||
if (-not $NoProfile) {
|
$name = $Arguments.Name;
|
||||||
$name = $Arguments.Name;
|
|
||||||
|
|
||||||
Add-PowerShellProfileStatement `
|
Add-PowerShellProfileStatement `
|
||||||
-DefaultUser `
|
-DefaultUser `
|
||||||
-Category $name `
|
-Category $name `
|
||||||
-Script "Import-Module `"$name`";";
|
-Script "Import-Module `"$name`";";
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue