3 Replies Latest reply on Jun 8, 2010 7:19 AM by RobMokkink

    VMware.Vim.DVSSecurityPolicy

    RobMokkink Expert

      After reading some articles on the site of luc (www.lucd.info)

      I used some of his functions to create some dswitches.

       

      For the creation of portgroups i wanted to change the security settings to disallow, promiscious mode, mac changes and forged transmits, like so:

       

           $spec.defaultPortConfig.securityPolicy = New-Object VMware.Vim.DVSSecurityPolicy

           $spec.defaultPortConfig.securityPolicy.allowPromiscuous = $false

           $spec.defaultPortConfig.securityPolicy.forgedTransmits = $false

           $spec.defaultPortConfig.securityPolicy.macChanges = $false

       

      But for some reason this doesn't work, i get the following error:

       

      Exception setting "MacChanges": "Cannot convert value "False" to type "VMware.V

      im.BoolPolicy". Error: "Invalid cast from 'System.Boolean' to 'VMware.Vim.BoolP

      olicy'.""

       

      What am i doing wrong?