< Back

Remove-AzureRmOperationalInsightsWorkspace

Thu Apr 04, 2019 5:40 am

NAME Remove-AzureRmOperationalInsightsWorkspace



SYNOPSIS

Removes a workspace.





SYNTAX

Remove-AzureRmOperationalInsightsWorkspace [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-Force]

[-Confirm] [-WhatIf] [<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.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the command to run without asking for user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the workspace.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of an Azure resource group.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS



NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... sworkspace

Azure Operational Insights Cmdlets

Get-AzureRmOperationalInsightsWorkspace