I'm having a System.Array that defines the permissions of a specific security group on a folder, which looks like this:
$Permissions
C\Department : FINANCE
BEL ROL-STAFF-FIN Accountants : L
BEL ROL-STAFF-SA Sales Employees : F
C\Department : SALES
BEL ROL-STAFF-FIN Accountants : C
BEL ROL-STAFF-SA Sales Employees : F
$Permissions.Count # Returns 2
What I would like to know is how can I add another security group?
If I would like to add the security group BEL ROL-STAFF-IT Service Desk with the value F to the example above, the result would be:
$Permissions
C\Department : FINANCE
BEL ROL-STAFF-FIN Accountants : L
BEL ROL-STAFF-SA Sales Employees : F
BEL ROL-STAFF-IT Service Desk : F
C\Department : SALES
BEL ROL-STAFF-FIN Accountants : C
BEL ROL-STAFF-SA Sales Employees : F
BEL ROL-STAFF-IT Service Desk : F
$Permissions.Count # Returns 2
It seems easy to just add a row to an array, but how does one add a key/value pair to an existing row in the array so the count stays the same?
Thank you for your help.