What I learned about powershell in 2017, according to my twitter archive
Nov 24, 2017
#TodayILearned that:
$Content = get-content somefile.txt | out-string
…preserves the line breaks in the text file
via social.technet.microsoft.com/Forums/sc…
Nov 21, 2017
set backupdir=C:\temp\vim set directory=C:\temp\vim
via @hellojs_org at blog.hellojs.org/configure…
Nov 8, 2017
#TodayILearned that the batch command equivalent of the bash sleep is Timeout
May 24, 2017
#TodayILearned that you can replace a pattern in Powershell: “images\Leopold_I_of_Belgium 226x300” -replace “[0-9][0-9]x[0-9][0-9]”,""
Mar 31, 2017
#TodayILearned that if you put a ValidateSet on a #Powershell cmdlet parameter, then ISE Tab-completion will pick it up. Very handy!
Mar 21, 2017
#TodayILearned you can omit the Get- from Powershell commands…‘tho just because you can…doesnt mean you should!
community.idera.com/powershel…
Jan 20, 2017
#TodayILearned that you can set a CSV in a here-string and turn it into an object.
Handy for small test datasets in @PSPester
Jan 3, 2017
#TodayILearned that ‘show-command’ in Powershell creates a nice little GUI window for a function or cmdlet community.idera.com/powershel…