Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 246801

Re: Setting permissions on a VM

$
0
0

Thanks, Adrian! I have modified your script slightly since my AD groups already exist. The only line I changed was

 

$mrdgrp = Get-ADGroup $ADVMGroupName

 

The very last line in your script is giving me problems.

 

$authMgr.SetEntityPermissions($vmi.MoRef, $perm) is throwing the error:

 

Exception calling "SetEntityPermissions" with "2" argument(s): "The user or group named 'CN=VMCA_group_name,OU=CloudVMConsoleAccessGroups,DC=a***,DC=C********,DC=EDU' does not exist."
At C:\Util\VMwareGroupTest.ps1:34 char:33
+    $authMgr.SetEntityPermissions <<<< ($vmi.MoRef, $perm)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

That group does exist in AD and is found when I run the Get-ADGroup line. Any thoughts?


Viewing all articles
Browse latest Browse all 246801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>