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;
|
||||
};
|
||||
|
||||
configurator = {
|
||||
configurator = ($NoProfile.IsPresent) ? { } : {
|
||||
param(
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
if (-not $NoProfile) {
|
||||
$name = $Arguments.Name;
|
||||
$name = $Arguments.Name;
|
||||
|
||||
Add-PowerShellProfileStatement `
|
||||
-DefaultUser `
|
||||
-Category $name `
|
||||
-Script "Import-Module `"$name`";";
|
||||
}
|
||||
Add-PowerShellProfileStatement `
|
||||
-DefaultUser `
|
||||
-Category $name `
|
||||
-Script "Import-Module `"$name`";";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue