Renames all instances of a script, and updates any usage of it.
Rename-Script.ps1 [-OldName] <String> [-NewName] <String> [[-ScriptDirectory] <String[]>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Rename-Script.ps1 Get-RomanNumeral.ps1 ConvertTo-RomanNumeral.ps1
Renames the script file, and searches other script files for references to it, and updates them.
The current name of the script to change.
Type: String
Parameter Sets: (All)
Aliases: From
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The desired name of the script to change to.
Type: String
Parameter Sets: (All)
Aliases: To
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Any directories within which to rename the script (and any usage).
Type: String[]
Parameter Sets: (All)
Aliases: Directory
Required: False
Position: 3
Default value: .
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.