Is ForceDelete removed? I'm sure I've missed something.... Is there another way to do this now?
When copying the command directly from the page and replacing with variables (or strings, either way), I am unable to use the -ForceDelete parameter/switch.
Remove-AzOperationalInsightsWorkspace -ResourceGroupName $rgName -Name $workSpaceName -ForceDelete
Remove-AzOperationalInsightsWorkspace : A parameter cannot be found that matches parameter name 'ForceDelete'.
At line:4 char:87
Neither does -ForceDelete show up in help
I've installed module version 2.2.0 from the online repository, which has this helpfile for the cmdlet, noticeably absent is the -forcedelete option
PS C:WINDOWSsystem32> help Remove-AzOperationalInsightsWorkspace
NAME
Remove-AzOperationalInsightsWorkspace
SYNOPSIS
Removes a workspace.
SYNTAX
Remove-AzOperationalInsightsWorkspace [-ResourceGroupName]
[-DefaultProfile
[-Force] [-Confirm] [-WhatIf] [
DESCRIPTION
The Remove-AzOperationalInsightsWorkspace 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.
RELATED LINKS
Online Version:
https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/remove-azoperationalinsightsworkspace
Azure Operational Insights Cmdlets
Get-AzOperationalInsightsWorkspace
REMARKS
To see the examples, type: "get-help Remove-AzOperationalInsightsWorkspace -examples".
For more information, type: "get-help Remove-AzOperationalInsightsWorkspace -detailed".
For technical information, type: "get-help Remove-AzOperationalInsightsWorkspace -full".
For online help, type: "get-help Remove-AzOperationalInsightsWorkspace -online"
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@danabrash We are checking this and we will get back to you.
Hi, any update? I have same issue.
The -ForceDelete option was added in version 2.3.0 of the Az.OperationalInsights module (released July 17th), which hasn't made it to the main Az install as yet.
Check which version you have with a 'Get-Module Az.OperationalInsights', you may have to do a 'Install-Module Az.OperationalInsights -RequiredVersion 2.3.0' to install the later version.
Thanks for the reply, @SteveBurkettNZ .
@danabrash - please let us know if you have any follow-up questions.
We will now close this issue. If there are further questions regarding this matter, please reply and we will gladly continue the discussion.
sorry for re-open, but I wanted to confirm that this was indeed the solution for me. I have tested and it works perfectly as @SteveBurkettNZ described.
thank you very much for your help
Most helpful comment
The -ForceDelete option was added in version 2.3.0 of the Az.OperationalInsights module (released July 17th), which hasn't made it to the main Az install as yet.
Check which version you have with a 'Get-Module Az.OperationalInsights', you may have to do a 'Install-Module Az.OperationalInsights -RequiredVersion 2.3.0' to install the later version.