From the course: PowerShell for SQL Server Administration

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Storing servers for PowerShell

Storing servers for PowerShell - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Storing servers for PowerShell

- One of the things we need to do when we're working with PowerShell is iterate through a lot of servers or maybe all the servers in our environment. So how do we need to store that data and how do we need to get access to that data so we can use it as we try to iterate through? Now the big power of Powershell is the fact that we can manage all of our servers in our environment in one simple, easy-to-use script so you can iterate through all those servers and do stuff. Now to do that we obviously need a list of servers. So how do we want to maintain that list of servers? Well got a lot of options, but it doesn't really matter which one we pick as long as we're consistent in our company we should be good to go. Now that list of servers is going to be what we iterate through and what PowerShell iterates through as we try to pull through that list of servers and do something. So we could either install patches or we could make sure we're in compliance, whether we have all the various…

Contents