PowerShell for IT Professionals [#18] – Working with text strings

Although PowerShell treats everything as object - including text strings - working with text might be particularly difficult - at least when first approached. In this lesson we are going to have a closer look at what is possible with built in text methods and see how these can help us e.g. by extracting a substring of text. PowerShell can also be great at parsing log files - we will use Select-String to quickly filter out the lines of text with the phrase we are looking for e....

3 November 2020 · 2 min · 395 words · Kamil

Powershell – resolve full names to usernames from CSV file

It’s unbelievable how long it took me to figure out this simple Powershell script, but yet it does the trick :). Often you receive a request to do a certain action with a bunch of accounts, and (obviously) the list provided contains the full names rather usernames. Pain to do it manually, but yet we can utilise Powershell here. What you need: CSV file, with only one column, and the header of the column must be called “Name”, if you prefer to use something different, simply amend Name in line 6 to reflect your header....

21 October 2017 · 1 min · 181 words · Kamil