Skip to main content

All Questions

3 votes
1 answer
47 views

Comparing a set of parameters contained in two separate strings in Powershell

I have a situation where I need to compare two strings with each other in a foreach loop that potentially run over millions of rows of data. The two strings will always contain between 1 and 12 ...
Tanaka Saito's user avatar
3 votes
2 answers
715 views

Smartly joining possibly empty strings

I want to join two fragments into one string with a separator, but when one of the fragments is empty I only want one of them. I have two implementations. The first is long and slightly repetitive, ...
schuelermine's user avatar
2 votes
2 answers
3k views

Adding some properties to an Active Directory user

I was writing the below section of code which adds some user properties to an Active Directory user, and got wondering - surely we can improve the readability of this : ...
Bassie's user avatar
  • 559
1 vote
1 answer
2k views

Tree-view of Active Directory group memberships using recursion

Using Powershell, I've created a script to create a tree-view of a group/s' memberships in Active Directory. I originally had layers of nested loops, but I wanted a more algorithmic solution. The ...
Jarom's user avatar
  • 37