From the course: Advanced PowerShell: Automating Active Directory Administration
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Performing AD maintenance
From the course: Advanced PowerShell: Automating Active Directory Administration
Performing AD maintenance
- [Instructor] We can do updates using PowerShell and we need to get into the PowerShell ISE in order to get started. So I recommend that you pause the tape and go ahead and open up PowerShell ISE so we can put in some cmdlets and then save those as a script. (funky upbeat music) (graphic beeps) And my first command is typically the first command that's run in just about every script, and that is the set-executionpolicy to be unrestricted. And the reason for that is so anything that comes after it does not get blocked because of the restricted policy, which is there by default. Next, I'm going to run the Install-Module PSWindowsUpdate. And that's because by default you cannot run Windows updates from PowerShell. You have to have the module installed as well. And with that module installation comes the Get-WindowsUpdate cmdlet. So without running that installation you wouldn't be able to run that next one, the…
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.