Often there are various build processes or other automated tasks that run via PowerShell and need to be run as administrator. If you forget to run it as administrator, it won't work, and you don't always know.
I came across a great blog post by Ben Armstrong that I have to share, where he's created a block of code you just prefix to the beginning of your PowerShell script that will re-launch it as administrator if it is not. Check his post out here:
http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/09/23/a-self-elevating-powershell-script.aspx
Here's a screenshot of the PowerShell code in case his blog goes down:
I really have no words to thank you because i was having this assignment and was worried where to start. But you really have helped me.
ReplyDeleteThanks for your sharing. Hope you can contribute more quality posts to
ReplyDeletethis page. Thank you! Nonton Drama Korea
Sadece bir kumarhane oyun sitesinde yapılabilecek harika şeyleri her zaman yapmaya başlayabilirsiniz. Herkes mükemmel online casino oyunları oynayabilir. Kumarhanelerde sadece tipobet365 indir gerçek adamlar kazanabilir ve şimdi size harika kumarhanelerden bahsedebilirim.
ReplyDelete