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
From the course: Learning PowerShell for Windows Server Administration
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Differences between cmdlets and other PowerShell commands8m 43s
-
(Locked)
Creating functions7m 12s
-
(Locked)
How to utilize aliases3m 49s
-
(Locked)
Managing execution policies4m 51s
-
(Locked)
Editing PowerShell profiles7m
-
(Locked)
Demonstrating loading modules2m 57s
-
(Locked)
Challenge: PowerShell components3m 17s
-
(Locked)
Solution: PowerShell components8m 30s
-
-
-