onsdag 14 maj 2014

Inventory done with Powershell

I was sitting in my corner of the workshop minding my own business when I got the question "Hey Joseph, can you find out where the XXX account is used in the domain?"

Without hessitation I answer "Of course I can! And it wont take long!"
I was all joy and happiness beacuse I knew that I could do all the inventory from Powershell but I had no clue on how to do it programmatically but after a quick search on the internet I found what I needed.

Since Santas Workshop has a few SQL servers I wanted to search through them as well just to make sure that the account was not used within SQL and I stumble across a superb too called SQL PowerDoc and it's written by Kendal VanDyke.

That took care of the SQL Servers, but how about all services and if there are any Task Sequences using this XXX account?

Then I found this great script called Get-RunAsAccount.ps1 from Jan Egil Ring's blog that pointed me in the right direction. This little nifty script finds pretty much all that I was interested in.

In all it took me just a few (2-3) hours to do an inventory of all the servers out there in the Santas Workshop and it's all done with Powershell.

I have a colleauge that's not that much into Powershell (He's stuck in the VB world) and he was in awe over how easy it is to work with powershell.

Ok, so I'll head back to the cellar and continue to build the cloud solution for Santa so he finally can get migrated from the competitors onto Hyper-V

/Joseph

Inga kommentarer:

Skicka en kommentar