Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-WAPackCloudService

Remove-WAPackCloudService

microsoft.windowsazure.commands.dll

Synopsis

Removes cloud service objects.

Syntax

Remove-WAPackCloudService [-CloudService] [-PassThru] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Remove-WAPackCloudService cmdlet removes cloud service objects.

Parameters

-Force <SwitchParameter>

Indicates that the cmdlet removes a virtual machine without prompting you for confirmation.

Aliases

None

Required?

false

Position

3

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

2

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-CloudService <CloudService>

Specifies a cloud service. To obtain a cloud service, use the Get-WAPackCloudService cmdlet.

Aliases

None

Required?

true

Position

1

Default value

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

None

Examples

Example 1: Remove a cloud service

The first command gets the cloud service named ContosoCloudService01 by using the Get-WAPackCloudService cmdlet, and then stores that object in the $CloudService variable.

The second command removes the cloudservice stored in $CloudService. The command prompts you for confirmation.

          PS C:\>$CloudService = Get-WAPackCloudService -Name “ContosoCloudService01”
          PS C:\>Remove-WAPackVM -VM $CloudService
        

Example 2: Remove a cloud service without confirmation

The first command gets the cloud service named ContosoCloudService02 by using the Get-WAPackCloudService cmdlet, and then stores that object in the $CloudService variable.

The second command removes the cloud service stored in $CloudService. This command includes the Force parameter. The command does not prompt you for confirmation.

          PS C:\>$CloudService = Get-WAPackCloudService -Name "ContosoCloudService02"
          PS C:\>Remove-WAPackCloudService -VM $CloudService -Force
        

Get-WAPackCloudService
New-WAPackCloudService