PVS 2402 CU3 - Attempting to set ReadOnly Rights on AD Group in Farm by Powershell fails

book

Article ID: CTX695936

calendar_today

Updated On:

Description

Administrators who want to set an Active Directory Group as Read Only Group in the PVS Farm with Powershell using Set-PvsAuthGroup OR Grant-PvsAuthGroup may encounter an error indicating that the isReadOnly parameter is not available in the Database with PVS 2402 CU3 or earlier versions. 

PS > Get-PvsAuthGroup
 
AuthGroupId   : 12341234-1234-5678-8c69-c8adf2cce130
Guid          : 12341234-1234-5678-8c69-c8adf2cce130
AuthGroupName : %DNSDomain%/OU1/OU2/OU3/PVS-ReadRights
Name          : %DNSDomain%/OU1/OU2/OU3/PVS-ReadRights
Description   :
Role          :
IsReadOnly    :
 
 
PS > Set-PvsAuthGroup -Name "%DNSDomain%/OU1/OU2/OU3/PVS-ReadRights" -IsReadOnly $true
Set-PvsAuthGroup : A positional parameter cannot be found that accepts argument 'True'.
At line:1 char:1
+ Set-PvsAuthGroup -Name "%DNSDomain%/OU1/OU2/OU3/PVS-ReadRights" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-PvsAuthGroup], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Citrix.PVS.SnapIn.SetPvsAuthGroup
 
PS > Grant-PvsAuthGroup -AuthGroupId "12341234-1234-5678-8c69-c8adf2cce130" -IsReadOnly $true
Grant-PvsAuthGroup : A database error occurred.
Invalid column name 'isReadOnly'.
At line:1 char:1
+ Grant-PvsAuthGroup -AuthGroupId "12341234-1867-4a02-8c69-c8adf2cce130 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : DeviceError: (System.Collecti...ystem.String][]:KeyValuePair`2[]) [Grant-PvsAuthGroup], PvsException
    + FullyQualifiedErrorId : Citrix.PVS.SnapIn.DatabaseError,Citrix.PVS.SnapIn.GrantPvsAuthGroup

Cause

Documentation error and product bug

Resolution

Set-PVSAuthGroup is not a suitable cmdlet for giving permissions to a group. This cmdlet was listing isReadOnly parameter erroneously and this problem with the cmdlet has been fixed in PVS 2402 CU4 and later releases. Only Grant-PVSAuthgroup should be used to give permissions. Here is the list of cmdlets and their intended purpose:

New-PVSAuthgroup is used to add a new group
Grant-PVSAuthgroup is used to give security permissions for the group (and make it read only if desired)
Revoke-PVSAuthgroup is used to revoke the security permissions given to a group
(If a group is already granted read write permissions, it must be revoked first before making it read only via Grant-PVSAuthgroup)
Remove-PVSAuthgroup is used to remove the existing group

image.png

Issue/Introduction

Administrators who want to set an Active Directory Group as Read Only Group in the PVS Farm with Powershell using Set-PvsAuthGroup OR Grant-PvsAuthGroup may encounter an error indicating that the isReadOnly parameter is not available in the Database with PVS 2402 CU3 or earlier versions.