The Surly Admin

Father, husband, IT Pro, cancer survivor

Exporting User Information

Need to export user information to a CSV?  Perhaps as part of your termination user process?  Incredibly easy with PowerShell, let’s see how to do it.

Continue reading

July 14, 2014 Posted by | Powershell - Getting Started | , , , , | Leave a comment

Set-ShutdownComputers – Without Confirmation

A while back I wrote a script that would restart a computer, but require a very firm confirmation from the administrator.  Two levels of confirmation, in fact and it’s been a fairly popular post on the blog too.  Recently someone asked for a similar script to work off of a set of computers, and considering the work I’ve been doing recently with the pipeline I thought this was an ideal time to revisit that script and add some functionality.  And remove the confirmations because seriously, what could go wrong?

Continue reading

Advertisement

February 7, 2013 Posted by | PowerShell | , , | Leave a comment

Functions That Use the Pipeline

Earlier this week I talked about creating HTML reports from within Powershell, using the ConvertTo-HTML cmdlet.  One of the technique’s I used was a custom function I wrote called Set-AlternatingRows which took the table created by ConvertTo-HTML and alternated the row colors.  This was a great exercise in using Functions and the Pipeline and I wanted to talk about that today.

Continue reading

January 24, 2013 Posted by | PowerShell | , , | 7 Comments

Powershell and the Pipeline

Continuing the “Getting Started” series with a talk about the 7 major things you’ll use in Powershell.  This is by no means a comprehensive list of how to use Powershell but something to get you started.  One of the more powerful features of Powershell is the pipeline.  If you ever used DOS and batch programming you know all about the pipeline and Microsoft has really embraced it with Powershell.

Continue reading

September 27, 2012 Posted by | Powershell - Getting Started | | 1 Comment