I'm trying to pass a string array to a function, as well as a variable (which I've made into a single element array), but i'm not sure what the format is.
Function UpdateMembership ([string[]]$arr,[string[]]$group)
{
write-host $arr[0]
write-host $arr[1]
write-host $Group[0]
}
$OUs = @(
"test1",
"test2"
)
$groupname = @("group")
UpdateMembership ($Ous, $groupname)
$groupname = @()
$Ous = @()
forloop and update it. Or directly call @OU and @Groupname in the updatemembership function