HPE OneView

remove-hpovenclosure cmdlet is not working

 
santhoshcv
New Member

remove-hpovenclosure cmdlet is not working

remove-hpovenclosure cmdlet is not working

we are in middle of deco.remove-hpovenclosure cmdlet is not working.I am using version 4.20 CMDLEt

Remove-HPOVEnclosure -name hfe50021v


Remove-HPOVEnclosure -enclosure "hfe50021v"

Getting below error:

 

 

Remove-HPOVEnclosure : The Enclosure resource is not an expected category type []. Allowed resource category type is 'enclosures'. Please check the object provided and try again.
At line:1 char:1
+ Remove-HPOVEnclosure -enclosure "hfe50021v"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (InputObject:PSObject) [Remove-HPOVEnclosure], InvalidOperationException
+ FullyQualifiedErrorId : InvalidArgumentValue,Remove-HPOVEnclosure

 

 

 

1 REPLY 1
ChrisLynch
HPE Pro

Re: remove-hpovenclosure cmdlet is not working

That will not work as object names in any other Cmdlet not using the Get verb is unsupported.  You should use the following instead:

 

Get-HPOVEnclosure -Name hfe50021v | Remove-HPOVEnclosure

This is documented in the Get-Help Get-HPOVEnclosure examples.

 


I am an HPE employee

Accept or Kudo