Powershell Needful Things put that in your pipeline

11Nov/100

Site Migration

Posted by Jean Louw

Site Header

Hello devoted readers and newcomers. Welcome to my new blog site.

You have been redirected from the old Blogger page!

I have relocated from Blogger to a hosted solution as this gives me more flexibility and control with plugins and editing, especially with regards to code blocks.

Lately I have found Blogger to become more and more cumbersome to use, and this caused me to blog less and less. Hopefully now with the new site, and new functionality I will be posting scripts on a more regular basis.

If you came here looking for a specific post, please use the search if you are unable to locate the post. The site is still a work in progress, so if something does not work as it should, please pop me a mail, or leave a comment and I will repair the fault as soon as I can.

To all of the mailing list subscribers, I have feedburner installed on the new site, you should be able to use the link on the side to subscribe to the feed again.

Thanks for your support, and enjoy the site and the content provided, if you like what you read, please reweet the post.

As always, your comments and suggestions are always welcome.

PS.: I have added an image which I use as a header for the site. You can download it and use it. It makes a pretty cool desktop background.

Filed under: general, info, site No Comments
4Aug/1052

Check free space on volume mount points

Posted by Jean Louw

Wow! It’s been a while since I have posted any scripts! This is mainly due to the fact that I am rather busy at work, and also working hard at completing my MCITP.

A while back a client of mine, asked if there was an easy way to use one computer to check the free space of mount points. This was a real problem for them, as the administrators would come in every morning and manually logon to each server, and use disk management to check the free space.

I was certain that there had to be a WMI object for mount points, so after a little digging, I came up with the following script:

$TotalGB = @{Name="Capacity(GB)";expression={[math]::round(($_.Capacity/ 1073741824),2)}}
$FreeGB = @{Name="FreeSpace(GB)";expression={[math]::round(($_.FreeSpace / 1073741824),2)}}
$FreePerc = @{Name="Free(%)";expression={[math]::round(((($_.FreeSpace / 1073741824)/($_.Capacity / 1073741824)) * 100),0)}}

function get-mountpoints {
$volumes = Get-WmiObject -computer $server win32_volume | Where-object {$_.DriveLetter -eq $null}
$volumes | Select SystemName, Label, $TotalGB, $FreeGB, $FreePerc | Format-Table -AutoSize
}

$servers = (Get-Content .\servers.txt)

foreach ($server in $servers){
get-mountpoints
}

The script is written to collect server names from a text file, but you could use any other method to supply you server names.

Hope this helps someone else!

3Nov/090

New Look

Posted by Jean Louw

If you are a regular visitor, you may have noticed that the site looks a little different.

I looked at the site during last week and decided that I had enough of the standard old blogger template. It was really boring, and half the blogger sites out there use the same template.

I spent most of Friday getting the new look ready, and I am pretty sure I have it all working now. I have added some RSS feeds and a Feedburner email subscription page.
I think the new look is cleaner and a little more unique, and I really hope you like it too.

Your comments and suggestions are always welcome.