RSS

Category Archives: Automation

2nd Dutch PowerShell UserGroup DuPSUG meeting on the 6th of June in Hilversum

After the great first Dutch PowerShell UserGroup (DuPSUG) meeting last November, the 2nd meeting will be held on the 6th of June in Hilversum at InterAccess. At http://www.dupsug.com you can find more information about the event including a schedule and a registration form.

I really liked the previous meeting, so I’m going to attend this time as well. I hope to see you there.

PS: The number of attendees is limited, so don’t wait too long.

 

PowerShell – Book review of : Learn PowerShell Toolmaking in a month of lunches

At the end of February I published a review of “Learn Windows Powershell 3 in a month of lunches”. Even though it is a well written book from which I learned a couple of things, it did ‘t increase my productiviteit with PowerShell as much as I had wanted. This is probably due to the Windows PowerShell knowledge I already had.

I decided to read “Learn Windows PowerShell Toolmaking in a month of lunches” next and I have to say this was exactly what I needed … and more.

I think it really made my scripts more flexible and easier to maintain and manage. It was also great to see how easy it can be to create a GUI version of your PowerShell script. I will try to post some scripts and GUI examples to my blog soon so you can be the judge :).

There were also some things that weren’t (yet) relevant to me, but it is good to be aware of them and being able to revisit them when necessary.

 
1 Comment

Posted by on March 12, 2013 in Automation, ICT, Microsoft, Powershell, Windows

 

PowerShell – Book review of : Learn Windows PowerShell 3 in a month of lunches, second edition

About 6-7 years ago at school we were taught how to script using VBscript. I was really bad at it though and never really made an effort to change that. When PowerShell became more popular however I had gained some working experience and was also pleasantly surprised by the simplicity of it.

I started learning about PowerShell scripting by googling and using script examples. Disadvantages of this approach however is that:

  • You can pick up bad habits from others (without realizing it).
  • You sometimes don’t know exactly why you’re doing things a specific way.
  • You sometimes don’t know why some things are/aren’t working.

PowerShell is getting increasingly important though:

  • Even though more companies are offshoring and employees are relatively, it is still cheaper to automate instead.
  • Cost isn’t the only issue, speed is important as well. Scripting allows you to get things done more quickly.
  • PowerShell is increasingly being adopted by more companies, products and (cloud) services.
  • The number of available built-in cmdlets are increasing, which makes it even easier to automate actions.
  • For many products you have to use PowerShell to make specific settings, because only the more basic settings are available in a Graphical User Interface (GUI).
  • Changes can be applied consistently in a development, test, acceptance, pre-production, production environment.
    • Less chance of human error.
    • If done correctly, you’ll also have included a way to quickly revert the changes by script.

To make sure I didn’t miss out on too many things, I decided to start with a book that teaches the basics. Because of the good reputation of the authors Don Jones and Jefferey D. Hicks in the PowerShell community, I decided to go for their book “Learn Windows PowerShell 3 in a month of lunches, second edition” published by Manning Publications Co.

The book’s purposely didn’t try to stuff all PowerShell related information into the book. Instead it provided the reader/student with the basics needed to be able to find/discover this information themselves if needed. I personally like this approach, because otherwise there would be too much information to take in which might be demotivating and distracting.

I also liked the practical examples of common mistakes made by people who are new to PowerShell. There were a lot of examples I ran into as well when I started using PowerShell and I think this will prevent people from becoming frustrated because they understand why things aren’t working the way they might have expected.

All in all this is a great book to start learning PowerShell. This is however just the start and you should expect to continue using other resources/books to further your knowledge. The book also provides links to useful resources as well. And most importantly … start using PowerShell more so you will learn by experience.

Personally I still have these books lying around, but haven’t decided yet which one to start with next:

I’m also still considering taking a PowerShell course, but I’m a bit hesitant about the added value because it’s hard to determine the quality of a course by the description.

If you have experiences or suggestions, please let me know.

 
2 Comments

Posted by on February 27, 2013 in Automation, ICT, Microsoft, Powershell, Windows

 

Tags: , , , , , , , , ,

PowerShell – Extract specific info from multiple source winaudit files

I run Winaudit on each server/system and save it to a central location named <computername>.csv                 This way I have access to a lot of information about each system. If you need a specific subset of information for each system however, you don’t want to have to open each file manually to get this information.

This script will parse each <computername>.csv to extract specifc information and save it to one new file containing this info for all parsed separate files.

 
2 Comments

Posted by on February 25, 2013 in Automation, ICT, Microsoft, Powershell

 

Tags: , , , , , , , , , , ,

Powershell – Get WSUS clients Without Sync Or Report In X Days

One of the tasks of a WSUS administrator is to make sure that WSUS clients are up-to-date. This requires the WSUS clients to report to the WSUS server on a regular basis.

So if clients do not report to the WSUS server, you need to investigate and resolve the issue.

This script will show you which WSUS clients haven’t reported in X days:
http://bjornhouben-web.sharepoint.com/Lists/Scripts/DispForm.aspx?ID=21

Another use case would be if you manage a WSUS infrastructure with an upstream server and multiple downstream servers for each customer. If one or more 3rd parties are responsible for managing the WSUS clients, you could use this script to automatically mail them the clients they’re responsible for that haven’t reported for X days.

 
Leave a comment

Posted by on February 17, 2013 in Automation, ICT, Microsoft, Powershell, Windows, WSUS

 

Tags: , , , , , , , ,

Event – Free Microsoft IT Camps

On a regular basis Microsoft and its partners host Free IT Camps. In the past I’ve blogged about them because I really think they’re a good way to quickly get up-to-date on products and technologies. Besides that it’s also a good way to get to know other people.

On the Microsoft Events website you can see which future events are available and not just IT Camps events.

Also should you not be able to attend an IT Camp, for Server 2012 you can also use IT Camps On-Demand.

 

Tags: , , , , , , , , , , , , ,

Powershell – Get GPO Report for an Active Directory domain

Sometimes you want to be able to quickly create a GPO report for an Active Directory domain. And ofcourse you can do this manually using the GUI as well, but with a PowerShell script you can automate and schedule it.

So here’s my script that will automatically save a time stamped GPO report for the current domain.

 

Powershell – Get Percentage of Pysical and Virtual Servers from your VMware and Cisco UCS combined for each location

In a previous blog post I’ve already shown this script that use PowerCLI to get the percentage of physical and virtual servers from your VMware environment for each Virtual Center server. This script however only took into account ESX hosts and VM’s in each Virtual Center server separately.

This means that:

  • The UCS blades weren’t taken into account as physical servers.
  • No percentage was being calculated for each physical location.

This new script automates determining for each location the number of physical and virtual servers in VMware vSphere and Cisco UCS.

PS: You can get more detailed information from the script, but it has been disabled using comments by default.

 

Tags: , , , , , , , , , , , , , , , , , , , , ,

PowerShell – Get UCS Blade Count

PowerShell has been adopted by many companies already including VMware and Cisco with its Unified Computing System (UCS).

This simple script will use the Cisco UCS PowerTool to connect to UCS and determine the blade count for each UCS server you’ve defined.

 

Tags: , , , , , , , ,

PowerShell – Get the percentage of physical and virtual servers from your VMware environment

With the current focus on Corporate Social Responsibility (CSR) including Green IT, it might be important to know what percentage of servers has been virtualized.

This script I made will use PowerCLI to get the percentage of physical and virtual servers from your VMware environment for each Virtual Center server. You can specify multiple Virtual Center servers if desired.

 

Tags: , , , , , , , , , , , , , , , , ,