Azure-docs: A parameter cannot be found that matches parameter name 'ForceDelete'.

Created on 24 Jul 2020  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-docs

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

  • ... orkspace -ResourceGroupName $rgName -Name $workSpaceName -ForceDelete
  • ~~~~

    • CategoryInfo : InvalidArgument: (:) [Remove-AzOperationalInsightsWorkspace], ParameterBindingException

    • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.OperationalInsights.RemoveAzureOperationalInsightsWorkspaceCommand

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] [-Name]
[-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"


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Azure-Monitosvc Pri2 cxp logsubsvc product-question triaged

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.

All 5 comments

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianpowell2017 picture ianpowell2017  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

bityob picture bityob  Â·  3Comments