Remove-​Azure​Rm​Operational​Insights​Workspace

Removes a workspace.

Syntax

Remove-AzureRmOperationalInsightsWorkspace
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-Force]
      [-InformationAction <ActionPreference>]
      [-InformationVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzureRmOperationalInsightsWorkspace cmdlet deletes an existing workspace. If this workspace was linked to an existing account via the CustomerId parameter at creation time the original account is not deleted in the Operational Insights portal.

Examples

Example 1: Remove a workspace by name

PS C:\>Remove-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosResourceGroup" -Name "MyWorkspace"

This command removes the workspace named MyWorkspace from the resource group named ContosoResourceGroup.

Example 2: Remove a workspace by using the pipeline and without confirmation

PS C:\>Get-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosResourceGroup" -Name "MyWorkspace" | Remove-AzureRmOperationalInsightsWorkspace -Force

This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then passes it to the Remove-AzureRmOperationalInsightsWorkspace cmdlet by using the pipeline operator to remove it. Since the Force parameter is specified, the command does not prompt you before removing the workspace.

Required Parameters

-Name

Specifies the name of the workspace.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of an Azure resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value: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
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False