Hi,
As Luc said PowerCLI does not have native support for Network objects yet but you can use SetEntityPermissions API method.
Note that there are some limitations for specific objects described in the SetEntityPermission help.
You can take a look at Luc's post in
The example script below assign Admin permission to the $netname network entity:
$SpecPG = Get-View -ViewType Network | where {$_.name -eq $netname}
$principal = "domain/username"
$role = $authMgr.RoleList | where{$_.Name -eq "Admin"}
$authMgr = Get-View AuthorizationManager
$perm = New-Object VMware.Vim.Permission
$perm.principal = $principal
$perm.propagate = $true
$perm.roleid = $role.MoRef
$authMgr.SetEntityPermissions($SpecPG.MoRef, $perm)
Regards,
Yasen Kalchev
PowerCLI Dev Team