Fix non-functioning script
This commit is contained in:
parent
ddc255221b
commit
8e9bbc75f3
1 changed files with 4 additions and 4 deletions
|
@ -68,16 +68,16 @@ $null = New-Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
$profiles | ForEach-Object {
|
$profiles | ForEach-Object {
|
||||||
$dirName = Split-Path -Parent $fileName;
|
$dirName = Split-Path -Parent $_;
|
||||||
|
|
||||||
if (-not (Test-Path -PathType Container $dirName)) {
|
if (-not (Test-Path -PathType Container $dirName)) {
|
||||||
$null = New-Item -ItemType Directory -Force $dirName;
|
$null = New-Item -ItemType Directory -Force $dirName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Test-Path -PathType Leaf $fileName) -and (-not $Overwrite)) {
|
if ((Test-Path -PathType Leaf $_) -and (-not $Overwrite)) {
|
||||||
Add-Content -Force "$fileName" "`n$Statement";
|
Add-Content -Force "$_" "`n$Statement";
|
||||||
} else {
|
} else {
|
||||||
Set-Content -Force "$fileName" "$Statement";
|
Set-Content -Force "$_" "$Statement";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue