Uninstall-Script
Uninstalls a script.
Uninstall-Script
[-Name] <String[]>
[-MinimumVersion <Version>]
[-RequiredVersion <Version>]
[-MaximumVersion <Version>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Uninstall-Script
[-InputObject] <PSObject[]>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Uninstall-Script
cmdlet uninstalls a specified script from the local computer.
This example uninstalls a script.
Uninstall-Script -Name UpdateManagement-Template
Uninstall-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-Script
Get-InstalledScript
uses the Name parameter to specify the script. The object is sent down the
pipeline to Uninstall-Script
and the script is uninstalled.
Prompts you for confirmation before running Uninstall-Script
.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces Uninstall-Script
to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Accepts a PSRepositoryItemInfo object. For example, output Get-InstalledScript
to a variable
and use that variable as the InputObject argument.
Type: | PSObject[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the maximum, or newest, version of the script to uninstall. The MaximumVersion and RequiredVersion parameters can't be used in the same command.
Type: | Version |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the minimum version of the script to uninstall. The MinimumVersion and RequiredVersion parameters can't be used in the same command.
Type: | Version |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies an array of script names to uninstall.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the exact version number of the script to uninstall.
Type: | Version |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if Uninstall-Script
runs. The cmdlet isn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
String[]
PSObject[]
Uninstall-Script
accepts PSRepositoryItemInfo objects from the pipeline.
PowerShellGet feedback
PowerShellGet is an open source project. Select a link to provide feedback: