ESXi

 View Only
  • 1.  Assertion Failed Error with New-VIPermission in PowerCLI script

    Posted Apr 08, 2015 11:00 PM

    Hello!

    I run a multi-tenancy system to provide my students with virtual space for their projects, and have created a script (finally!) to do my bidding. The script reads a CSV file, then creates resource pools, vm & templates folders, datastore folders, dvportgroups (and private/community vlan pairs), and sets permissions on each. The script runs _successfully_ (in that everything is set up as expected) but it throws an error that I cannot figure out. The line in the script that causes the problem is:

    Get-VDPortgroup $dvPrtGrpName | New-VIPermission -Principal $ad_grp -role $vrole

    I have tried various incarnations of this:

    New-VIPermission -Entity (Get-VDPortgroup $dvPrtGrpName) -Principal $ad_grp -role $vrole

    and

    $newdvprtgrp = (Get-VDPortgroup $dvPrtGrpName)

    New-VIPermission -Entity $newdvprtgrp -Principal $ad_grp -role $vrole

    but all throw up this message window:

    I have searched these forums, used Google, tried various key words, etc., but have found no answers.

    Does anyone have a suggestion of where to look, or what might be the problem(s)?

    Thanks!
    Mark



  • 2.  RE: Assertion Failed Error with New-VIPermission in PowerCLI script

    Posted Apr 08, 2015 11:21 PM

    Forgot to mention that I was running the script in the Powershell ISE with all the vmware snapins when I get this message. Just tried it in the actual PowerCLI 5.8 Release 1 console and it throws no error messages.