Testing for Admin Privileges in PowerShell
Sometimes when running a PowerShell script you may need to test at the beginning whether the process it was called from had Windows admin privileges in order to be able to achieve what it needs to do. Prior to PowerShell v4 I had used something along the lines of the following to test for this condition – not the most obvious piece of code ever to be fair:
Click here to be redirected to the original post of this article on the author’s blog site where you can read the remainder of the article.
Related Articles
Iron Scripter prequels: Puzzle 10 – A commentary
This is the commentary on the last Iron Scripter prequel puzzle: Iron Scripter Prequel Puzzle 10 - A commentary Next weekend will mark the start of summit and you can work on the Iron Scripter preludes - 4 daily puzzles as a lead in to the main event on Thursday 12 April 2018. If you haven’t chosen your faction yet you need to hurry
Iron Scripter Prequels: Puzzle 9 – A commentary
Here’s my commentary for puzzle 9: Iron Scripter Prequel Puzzle 9 - A commentary In this puzzle you were cleaning up the TEMP folder and the recycle bin plus working with scheduled tasks and/or scheduled jobs. One more commentary to come - probably early next week rather than Sunday and then we’re into the Summit and the main event.
Iron Scripter Preludes and Main Event: Rules and Info
Information is now available at IronScripter.us for the at-Summit events, and participants are advised to refresh themselves on the Rules. Participants attending Summit should begin choosing their faction and getting to know their teammates in the faction-specific channels of the DevOps-Summit Slack team (open only to attendees and alumni). Participants hoping to participate remotely may wish to start choosing a faction and finding a way to get in touch with them.