Unregister-ServiceFabricApplicationType
Unregisters a Service Fabric application type.
Syntax
Unregister-ServiceFabricApplicationType
[-ApplicationTypeName] <String>
[-ApplicationTypeVersion] <String>
[-Async]
[-Force]
[-TimeoutSec <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Unregister-ServiceFabricApplicationType cmdlet unregisters a Service Fabric application type. The application type must have been previously registered with Register-ServiceFabricApplicationType.
Before you unregister an application type, you must use the Remove-ServiceFabricService cmdlet to remove services that you base on the application. Use the Remove-ServiceFabricApplication cmdlet to remove instances of the application type. If you unregister an application type, the application package is removed from the image store.
To manage Service Fabric clusters, start Windows PowerShell by using the Run as administrator option. Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Examples
Example 1: Unregister an application type
PS C:\> Unregister-ServiceFabricApplicationType -ApplicationTypeName "CalcServiceApp" -ApplicationTypeVersion "1.0" -Force
This command unregisters the application type CalcServiceApp with version 1.0. When the command returns success, the application type was successfully unregistered. Because the command includes the Force parameter, the cmdlet does not prompt you for confirmation.
Example 2: Unregister an application type async
PS C:\> Unregister-ServiceFabricApplicationType -ApplicationTypeName "CalcServiceApp" -ApplicationTypeVersion "1.0" -Async
PS C:\> Get-ServiceFabricApplicationType -ApplicationTypeName "CalcServiceApp" -ApplicationTypeVersion "1.0"
Unregister-ServiceFabricApplicationType starts unprovisioning of the application type CalcServiceApp with version 1.0. Because the -Async switch is provided, the command returns as soon as the cluster receives the request. Get-ServiceFabricApplicationType gets the application types registered in the cluster with the specified filter. The returned application types (if any) include the registration status. The cmdlet can be used to see the unprovision progress. When the application type with the specified version is successfully unregistered, it won't be shown in the Get-ServiceFabricApplicationType output.
Parameters
-ApplicationTypeName
Specifies the name of a Service Fabric application type. The cmdlet unregisters the type that you specify.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApplicationTypeVersion
Specifies the version of a Service Fabric application type. The cmdlet unregisters the type that has the version that you specify.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Async
The command returns as soon as the unregister request is accepted by the cluster. Use the Get-ServiceFabricApplicationType command to query the status of the request. When passing the async switch, there is no need to increase the -TimeoutSec for large application packages.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Object