From the course: Advanced PowerShell: Automating Active Directory Administration

All ways to run PowerShell

- [Instructor] There are many different ways that we can start up PowerShell depending on which operating system you have. Now all modern Windows operating systems are going to include PowerShell but they're going to include different ways to access it. So for example, there's the PowerShell command and you can open that by just clicking on the Search button and typing in PowerShell. Or you can click on the Start menu. We also have Administrator PowerShell and that's going to be required for certain system level commands, certain things that only administrators can do. Now if you're logged in as the administrator then you shouldn't have any issues, but if not then you'll need to choose to log in with the Administrator PowerShell and then you get prompted for the username and password with login credentials for the administrator. And then you can go ahead and run those system level commands that will make changes to the operating system or other things that require administrator access. Next, we have PowerShell ISC, or Integrated Scripting Environment and that's what we use for making scripts and for testing various different commandlets. In PowerShell, when you type in a command we refer to it as a commandlet as opposed to a command in a regular command prompt or a more traditional type of command prompt which we just call a command. There's still other ways that we can utilize PowerShell, such as Windows Terminal and that's going to be on the latest versions of Windows, such as a Windows 11, although you can install it on older versions as well. Then you can go from a command prompt. So if you're in a command prompt then you can just type the word PowerShell from any command prompt and then you can go ahead and access PowerShell that way. And finally, we have from non Windows computers. You can run from other operating systems such as Linux. So to install on many different versions of Linux you can just type the command that you see here, the sudo apt update command, and then you can have PowerShell running on a Linux operating system. I'm on a Windows 11 computer. Here I can go to Search and type in PowerShell and here you see multiple different ways that I can open PowerShell. We can choose Open, as you see here. We can choose Run as administrator. So if I click on that and I'm not the administrator then it will prompt me for the username and password but since I am, it did not. And we can also increase the font as well as the size of the box by going into the upper left-hand corner and choosing Properties. If I go back to the Search once again and choose PowerShell then we have the option to open up the PowerShell Integrated Scripting Environment and that's going to, as I mentioned earlier, allow us to create scripts from multiple different commandlets. And when you first open this up it does look a little bit different and what you can do is click on this little box up at the top left called New Script and it allows you to type in various different commandlets one line at a time and then save those as scripts. And in an upcoming video we're going to go over this in more detail. On the right hand side you can see the list of all the different commands and there are a lot of them. There are hundreds of different commands and thousands of different switches. A switch allows you to take a commandlet and then modify it such as by specifying a name or a computer or some other resource. And another interesting way we can do this is to right click on the Start button and choose Windows Terminal. Windows Terminal is a combination of multiple different types of shells. So we can see PowerShell automatically opens up but I can also click on the dropdown and I can choose a Command Prompt and I can go ahead and run commands that way and I can also choose an Azure Cloud Shell if I have an Azure account. And I can go into Settings and make various different changes such as to the font, the colors and other options. And once you make some changes just go ahead and click save or discard those changes. This portion may have been a review for many of you, this being an advanced course, but things are going to move quickly in complexity in upcoming modules and I want to make sure you have the skills and understanding of the various ways you can access PowerShell to be able to manage active directory. Once we have chosen the way you'll open PowerShell you can go to the next steps of loading the active directory commands and starting to manage your active directory environment.

Contents