VMware Cloud Community
robinstolpe
Enthusiast
Enthusiast

What premissions are needed -StartConnected $true ?

Hi,
I get a error message when I try trough PowerCli to do ;

Get-VM -Name "xvm28599" | Get-CDDrive | Set-CDDrive -IsoPath 'xxxx' -StartConnected $true

I get this error message;

Set-CDDrive : 2021-04-12 14:19:13 Set-CDDrive Permission to perform this operation was denied.
At line:1 char:41
+ ... t-CDDrive | Set-CDDrive -IsoPath 'xxxxx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-CDDrive], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.SetCDDrive

 

 

So I'm wondering what premission I need to set/change? If I run the command without -StartConnected $true it work fine.

IT engineer that works with the hole VMWare portfolio and also loves to develop and automate in C# and PowerShell
0 Kudos
1 Reply
robinstolpe
Enthusiast
Enthusiast

Solved it, It was I that did write it wrong it should bee -StartConnected:$true

IT engineer that works with the hole VMWare portfolio and also loves to develop and automate in C# and PowerShell
0 Kudos