-
Notifications
You must be signed in to change notification settings - Fork 0
/
arrayListExample.ps1
41 lines (28 loc) · 1015 Bytes
/
arrayListExample.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#$arrayList = @(@("Store", "MembershipRule", "ExplicitAdditions"), @(), @())
#[System.Collections.ArrayList]$arrayList=(@("Store"),@("MembershipRule"),@("ExplicitAdditions"))
#$arrayList[0][1].Add("4444")
#$arrayList[1][1] = "some filter"
#$arrayList[2][1] = "-or (userpricipalname is yatata@gianteagle.com)"
#$arrayList = @(@("Store"),@("MembershipRule"),@("ExplicitAdditions"))
#$arrayList += , (@("val1", "val2", "val3"))
#$arrayList += , (@("val1"),@("val2"),@("val3"))
#$arrayList += @("val1","val2","val3")
<#
for ($parentLoop = 0; $parentLoop -lt 3; $parentLoop++) {
for ($childLoop = 0; $childLoop -lt 3 ; $childLoop++) {
"The value of [$parentLoop][$childLoop] ---> " + $arrayList[$parentLoop][$childLoop]
}
}
#>
$filterRule = ""
$arrayHash = @{
"111" = "additions"
}
$arrayHash.Add("555","anothafilta")
$arrayHash
foreach ($entry in $arrayHash.Keys) {
$adds+= " " +$arrayHash.Item($entry)
$filterRule = '(department -eq "$entry")'
}
$filterRule + $adds
$adds=$null