Skip to content

Commit 9221184

Browse files
committed
Corrected names of beta cmdlet links
1 parent 3452d72 commit 9221184

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/CorrectNames.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,17 @@ function Copy-Files{
6969
#Extract command over here
7070
$Command = [System.IO.Path]::GetFileNameWithoutExtension($File)
7171
$WrongCommandName = $Command.Replace("-Mg","-MgBetaBeta")
72+
$CorrectCommandName = $WrongCommandName.Replace("-MgBetaBeta","-MgBeta")
7273

7374
if((Get-Content -Raw -Path $File) -match $WrongCommandName){
7475
Write-Host "Found $WrongCommandName in $File"
76+
(Get-Content $File) |
77+
Foreach-Object { $_ -replace $WrongCommandName, $CorrectCommandName} |
78+
Out-File $File
79+
}
7580
}
7681
}
7782

78-
79-
}
80-
8183

8284

8385

0 commit comments

Comments
 (0)