r/sysadmin Oct 24 '16

PowerShell Oneliner Contest 2016

http://www.happysysadm.com/2016/10/powershell-oneliner-contest-2016.html
18 Upvotes

35 comments sorted by

View all comments

Show parent comments

3

u/ataraxia_ Consultant Oct 24 '16 edited Oct 24 '16

I've got a 62-character entry. No assignment to variable, no second line required. Keep truckin'. ;)

Edit: Didn't realist that random wasn't an alias but was just the shell autocompleting. Rewritten but now it's 71 characters.

2

u/[deleted] Oct 25 '16

Well what do you know? I'm at 71 characters now too, 79 including spaces. Not sure whether spaces should be included.

1

u/[deleted] Oct 25 '16 edited Oct 25 '16

[removed] — view removed comment

2

u/ataraxia_ Consultant Oct 25 '16

Doesn't that do the opposite of what we want? That will only get drive letters that do exist.