| external help file | PSModule-help.xml |
|---|---|
| Locale | en-US |
| Module Name | PowerShellGet |
| ms.custom | 3.0.22-beta22 |
| ms.date | 09/19/2023 |
| online version | https://learn.microsoft.com/powershell/module/powershellget/uninstall-script?view=powershellget-2.x&WT.mc_id=ps-gethelp |
| schema | 2.0.0 |
| title | Uninstall-Script |
Uninstalls a script.
Uninstall-Script [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion <String>]
[-MaximumVersion <String>] [-Force] [-AllowPrerelease] [-WhatIf] [-Confirm] [<CommonParameters>]
Uninstall-Script [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
The Uninstall-Script cmdlet uninstalls a specified script from the local computer.
This is a proxy cmdlet for the Uninstall-PSResource cmdlet in the
Microsoft.PowerShell.PSResourceGet. For more information, see
Uninstall-PSResource.
This example uninstalls a script.
Uninstall-Script -Name UpdateManagement-TemplateUninstall-Script uses the Name parameter to specify the script to uninstall from the local
computer.
In this example, the pipeline is used to uninstall a script.
Get-InstalledScript -Name UpdateManagement-Template | Uninstall-ScriptGet-InstalledScript uses the Name parameter to specify the script. The object is sent down the
pipeline to Uninstall-Script and the script is uninstalled.
The proxy cmdlet maps this parameter to the Prerelease parameter of Uninstall-PSResource.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: NameParameterSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe proxy cmdlet ignores this parameter since it's not supported by Uninstall-PSResource.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAccepts a PSRepositoryItemInfo object. For example, output Get-InstalledScript to a variable
and use that variable as the InputObject argument.
Type: System.Management.Automation.PSObject[]
Parameter Sets: InputObject
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseThe proxy cmdlet uses the value of this parameter to create a NuGet version search string for use
with the Version parameter of Uninstall-PSResource.
Type: System.String
Parameter Sets: NameParameterSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThe proxy cmdlet uses the value of this parameter to create a NuGet version search string for use
with the Version parameter of Uninstall-PSResource.
Type: System.String
Parameter Sets: NameParameterSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseSpecifies an array of script names to uninstall.
Type: System.String[]
Parameter Sets: NameParameterSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThe proxy cmdlet uses the value of this parameter to create a NuGet version search string for use
with the Version parameter of Uninstall-PSResource.
Type: System.String
Parameter Sets: NameParameterSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalsePrompts you for confirmation before running Uninstall-Script.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if Uninstall-Script runs. The cmdlet isn't run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.