diff --git a/docs/BreakingChangeMigration.ps1 b/docs/BreakingChangeMigration.ps1 new file mode 100644 index 0000000000..275b18bc94 --- /dev/null +++ b/docs/BreakingChangeMigration.ps1 @@ -0,0 +1,22 @@ +# Define the path to the CSV file and the script file +$csvPath = "docs\PowerShellBreakingChanges-V1.0.csv" #"docs\PowerShellBreakingChanges-Beta.csv" +$scriptPath = "" +$newScriptPath = "" + +# Import the CSV file +$cmdletMappings = Import-Csv -Path $csvPath + +# Read the script file contents +$scriptContent = Get-Content -Path $scriptPath -Raw + +# Replace old cmdlets with new cmdlets +foreach ($mapping in $cmdletMappings) { + $oldCmdlet = $mapping.OldCmdlet + $newCmdlet = $mapping.NewCmdlet + $scriptContent = $scriptContent -replace $oldCmdlet, $newCmdlet +} + +# Save the updated script content to a new file +$scriptContent | Set-Content -Path $newScriptPath + +Write-Host "Script updated and saved to $newScriptPath" \ No newline at end of file