PowerShell summer tips 04

PowerShell Summer Tips #4

When working with PowerShell my recommendation is allways to start PowerShell
with Run As Administrator.

Why?

Try this without doing it:

You can be administrator on the computer It does not matter.
It will work as It does in Windows doing the same stuff in the GUI.

And this is only some of the stuff that you can’t do when not running PowerShell As Administrator.

Some things will not show an error.
Just show you the wrong output.

One example is when working with Active Directory.
Some properties will not show If you are in an PowerShell session without Run As Administrator.
Even if you are the domain admin.

When scripting you can use this to be sure that the code is run in an elevated session.

Or else your script won’t run!

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.