Pokazywanie postów oznaczonych etykietą array. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą array. Pokaż wszystkie posty

2019-04-22

dynamic arrays in poweshell

By default arrays in Powershell are not dynamic, so the only way to deal with it is to use:
 
c:\>[System.Collections.ArrayList]$DynamicArray = @()
c:\>$DynamicArray.IsFixedSize 
False
c:\>$DynamicArray.Add("june")
c:\>$DynamicArray.Add("june")
c:\>$DynamicArray
june
june
c:\>$DynamicArray.Remove("june")
c:\>$DynamicArray
june
c:\>
We can pass this list to update membership in a group in Active Directory.
c:\>$DynamicArray = "january", "february", "march"
c:\>$DynamicArray += "april"
c:\>$DynamicArray += "april"
c:\>$DynamicArray
january
february
march
april
april
c:\>
So we can do it this way also.

2018-12-21

ADFS - how to translate single value claim to multivalue (array)

If You have single value claim just add another claim of this type - it will be added as second claim with this value so it will be an array.