From the course: Learning PowerShell for Windows Server Administration

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: PowerShell components

Solution: PowerShell components

(upbeat music) - [Instructor] In this results video, we'll see what cmdlets and results you should have gotten from the challenge video. To start off with, I had you create a New-Alias, and the cmdlet for that is simply New-Alias, followed by the name you would like to create, Get-UserInfo, and then we'll put in the cmdlet that we're going to mimic, which is going to be this Get-ADUser. You'll be creating a lot of different aliases in your career, and that alias can be any name, really, that you'd like, as long as it's not an illegal character that you would use in programming, for instance. So the Get-UserInfo could just be Get-Info. It could be anything that you want that isn't already in use. Now, after creating this, I can go ahead and run it. Get-UserInfo, followed by the name that I would like to get info about, and it's the administrator, and that's the same information we would've gotten if we chose get-aduser administrator. I could also just create another alias, and, let's…

Contents