• Main
  • Blog
  • Who We Are
    • Jeremy Anderson
    • Amy Babinchak
    • Steve Banks
    • Cliff Galiher
    • Brian Higgins
    • Eriq Neale
    • Edwin Sarmiento
    • David Shackelford
  • Store
    • Webinar Archives
  • Support
  • Forum
  • FAQ
  • My Third Tier
  • Datto

Archive for January 2011

Jan
29

Check for Free Space on your Drives – LazyAdmin PowerShell version

by edwin
When tasked to automate a task, I rely on my scripting background to get the job done. Back then, it was all VBScript. Now that more and more customers are moving to Windows Server 2008 servers, I try to convince my customers to use PowerShell for all their scripting needs.

A few weeks back, a friend of mine asked me to write a script that will check the disks on all of their servers and send a report via email.  They have over a hundred or so servers in their data center and it will be a bit cumbersome to log in to each server just to check for free space on their disks. While their network operations center have access to reports generated by their monitoring tools, she didn't. Which is why she opted to do it on her own. I tried to demonstrate why PowerShell was my scripting language of choice for this task by highlighting how this task can be done in a single line of code. Not that it can't be done otherwise but this is an effective way to tell people how easy it is to use Windows PowerShell. Below is the script to do the task (BTW, this can be written in a single line. The blog engine just made it as it is due to space constraints)

Get-WmiObject Win32_Volume -computername "localhost" |

Select-Object __SERVER, Name, @{Name="Size(GB)";Expression={"{0:N1}" -f($_.Capacity/1gb)}},@{Name="FreeSpace(GB)";Expression={"{0:N1}" -f($_.freespace/1gb)}},@{Name="FreeSpacePerCent";Expression={"{0:P0}" -f($_.freespace/$_.capacity)}} |
Where-Object -FilterScript {$_.FreeSpacePerCent -lt 15} |
Sort-Object -property "FreeSpacePerCent"
Format-Table

Now this may seem intimidating at first but let's disect the script to understand what it is doing. The Get-WmiObject cmdlet calls the Win32_Volume class to scan thru a list of disks (I'm using the -computer parameter to highlight an important concept later on.) This includes mountpoints, local drives and USB drives. If you're only concerned about local disks and mountpoints, you can exclude USB drives by filtering via the DriveType attribute of the Win32_Volume class.

Get-WmiObject Win32_Volume -computername "localhost"

Since we are interested in the size of the disk, the free space in GB and in per cent values, we will use the Capacity and FreeSpace attributes of the Win32_Volume class. We do need to perform some calculations to make sure that we get the values we are accustomed with - GB for capacity and per cent in free space value. That's what the calculations are for, noting that capacity and free space are expressed in bytes. The Select-Object cmdlet simply creates a new object by defining a new attribute from the original Win32_Volume class - server hostname, drive or mountpoint name, capacity and free space - named FreeSpacePerCent. This will definitely give you all the disks on a server with the defined attributes.

Select-Object __SERVER, Name, @{Name="Size(GB)";Expression={"{0:N1}" -f($_.Capacity/1gb)}},@{Name="FreeSpace(GB)";Expression={"{0:N1}" -f($_.freespace/1gb)}},@{Name="FreeSpacePerCent";Expression={"{0:P0}" -f($_.freespace/$_.capacity)}}

But we don't want all of the drives. We only want those that have FreeSpacePerCent value less than your allowable threshold. In this example, less than 15 %. So, we use the Where-Object to filter the results.

Where-Object -FilterScript {$_.FreeSpacePerCent -lt 15}

As an administrator, we need to make sure that we address issues that are more critical than others. This is where the Sort-Object cmdlet comes in. We sort the results in order of increasing FreeSpacePerCent so we can immediately address those disks with very little free space left.

Sort-Object -property "FreeSpacePerCent"

Finally, the Format-Table cmdlet is just for aesthetics. The reason is because I will be sending the results of this script as an email attachment.

Now, that wasn't so hard, was it? Understanding what each cmdlet is doing and how you can pipe the results to another cmdlet is the key to maximizing the use of PowerShell. But if you have a hundred or more servers, you wouldn't want to copy the script on all of your servers and run it from there, would you? There are a few ways to accomplish this. One of which is to ue PowerShell Remoting. This will be another topic for a blog post as there is more to it than just simply writing and executing a PowerShell script remotely. What I opted to do here is simpler since I'm assuming that my friend nor I don't have access to Active Directory to create Group Policies to enable PowerShell Remoting on all of the servers. Since the Get-WmiObject cmdlet has a -computer parameter, I can use that to execute queries against remote computers. What I can do is simply read thru a list - probably a list of computers in Active Directory or even as simple as a text file list. I opted for the text file list for the same reason that I didn't go for PowerShell Remoting. So, what I did was to convert the script above to a function that I will call while passing values to the -computer parameter of the Get-WmiObject


function getDiskFreeSpace
{
Get-WmiObject Win32_Volume -computername $args |
Select-Object __SERVER, Name, @{Name="Size(GB)";Expression={"{0:N1}" -f($_.Capacity/1gb)}},@{Name="FreeSpace(GB)";Expression={"{0:N1}" -f($_.freespace/1gb)}},@{Name="FreeSpacePerCent";Expression={"{0:P0}" -f($_.freespace/$_.capacity)}} |
Where-Object -FilterScript {$_.FreeSpacePerCent -lt 15}  |
Sort-Object -property "FreeSpacePerCent"  |
Format-Table
}

I will call this function as I read thru a list of servers in a text file passing the computer names as parameters. And since I want the results of the query in a single output file, I used the Out-File cmdlet to save the results in a text file


ForEach($s in Get-Content C:\serverlist.txt)
{
getDiskFreeSpace $s  | Out-File C:\diskFreeSpaceResults.txt -append
}

Sending emails


I used a simple script in the past to send emails via Windows PowerShell. This was prior to PowerShell v2.0

$SmtpClient = new-object system.net.mail.smtpClient
$SmtpServer = "smtp.yourmailserver.local"
$SmtpClient.host = $SmtpServer

$From = "Friendly Reminder "
$To = "recepient@yourmailserver.net"
$Title = "Subject Matter"
$Body = "Body Text"


$SmtpClient.Send($from,$to,$title,$Body)

With PowerShell v2.0, the Send-MailMessage cmdlet was made available to send an email message. This made it easier to integrate sending email functionalities in PowerShell scripts. Adding one more line to the script above, I've included email sending functionality with attachment

Send-MailMessage -to "recepient@mail.com" -from "sender@mail.com" -subject "Servers Disk Free Space Report" -Attachment "C:\diskFreeSpaceResults.txt" -SmtpServer "yourSMTPserver.mail.com"

Now, you can start using this script with a text file that lists all of your servers. Make sure that the server on which you will be running this script has Windows PowerShell v2.0 installed and that you can communicate with those servers. I've seen servers on different VLANs that are isolated from each other but are in the same Active Directory domain. This causes the script to fail due to connectivity issues. Check with your network administrator to be sure.
Categories : Edwin Sarmiento
Jan
25

January Webinar Available for Download

by Third Tier

Post to Twitter Post to Facebook Post to StumbleUpon

For those who were not able to attend last week’s webinar, the first in the Managing SBS 2011 series, the LiveMeeting recording is now available for download from our Store page (http://www.thirdtier.net/store/). To view the webinar, download the file, extract the ZIP file, go into the folder, and open the ReplayMeeting.htm file.

0 Categories : Amy Babinchak, Eriq Neale, SBS 2011, Webinar
Jan
25

How big should you make the SBS 2011 C: Volume?

by amy

Post to Twitter Post to Facebook Post to StumbleUpon

In the official Microsoft specifications, which you can find here, they have this to say:

Available Disk Space: Minimum: 120 GB

In the past minimum has always meant minimum. As in, you wouldn’t want to run a server like that, minimum. But with SBS 2011 it seems that minimum means something else because after installing the full server product its only taking up about about 45GB. So that leaves about 75GB for growth. Is it sufficient? Should you go with the minimum specification?

I put the question to a few experts – SBB MVPs. Here’s what they had to say:

  • Boon Tee: 127GB if virtual, 120GB otherwise.
  • Philip Elder: 130GB
  • Andy (Handy Andy) Goodman: 120GB so I can open it in Virtual PC
  • Kevin Royalty: 120GB

Seems that they are all pretty darn close to the minimum. Andy’s Virtual PC consideration is an interesting one. Certainly adds flexibility if you can mount an image of the server on your laptop.

So what’s my recommendation? It’s a bit higher. I’m going to go with 150GB. My experience with logs recently says the Microsoft has really upped the number of logs generated. Sure we have some new scheduled tasks designed to help automatically trim logs, but we’ve usually got so much drive space that I can afford to spend some GB’s on a bigger C volume.

To each your own then. The consensus is that the minimum is good.

—–

Click to hire us.
We’re Third Tier. We provide advanced Third Tier support for IT Professionals.
Third Tier Get Support BlogFeed Blog Twitter Twitter Facebook Facebook LinkedIn LinkedIN

0 Categories : Amy Babinchak, SBS 2011
Jan
20

Creating Bootable USB of SBS 2011 Standard Installation ISO

by Eriq

As discussed in the January 2011 Third Tier webinar on SBS 2011 Standard Installation, creating a bootable USB drive to run the installer from goes MUCH faster than running off a DVD, if you can find a DVD writer and dual layer media for the 6.5GB installation ISO for SBS 2011 Standard. Microsoft provides a tool that makes it very easy (note I said “easy” not “fast”) to transform your SBS 2011 Standard installation ISO into a bootable USB key. Here’s how to do it:

First, you need the following:

  1. A 64-bit Windows 7 system
  2. The Microsoft Windows 7 USB/DVD Download Tool installed on the Window 7 system ( http://images2.store.microsoft.com/prod/clustera/framework/w7udt/1.0/en-us/Windows7-USB-DVD-tool.exe)
  3. The SBS 2011 Standard Installation ISO

Once you have those in place, follow these simple instructions:

  1. Open the Windows 7 USB DVD Download Tool
  2. Click Browse and locate the SBS 2011 Standard Installation ISO file.
  3. Click Next.
  4. Insert the USB media (if it hasn’t already been inserted).
  5. Disable your on-access virus scan on the computer (this can interfere with the copy operations).
  6. Click USB Device.
  7. Select the correct USB media (needs at least 6.5GB space don’t forget) and click Begin copying.
  8. Wait a really, really long time….
  9. When the process completes, close the Windows 7 USB/DVD Download Tool and eject your USB key.
  10. Re-enable the on-access scanning of your anti-virus software.

That’s it, you’re done!

Now, since the USB media is writable (unlike the DVD media), you can do some interesting things with it, like copying your SBS Answer File to the USB key and have it already present when you start your installation or migration. But that also means that you can damage or destroy the install media if you accidentally overwrite or delete any of the files on the USB key, so tread lightly when making changes to the media.

[Note - the genesis of this idea came from Susan Bradley's post of a similar nature from September 2010, enhanced a little with some of the items I've picked up along the way...]

Categories : Eriq Neale, SBS 2011
Jan
20

Q&A from Managing SBS 2011 – Installation webinar

by Third Tier

Post to Twitter Post to Facebook Post to StumbleUpon

Here is the Q&A from today’s webinar on Managing SBS 2011 – Installation:

Question: sas or sata drives?
Answer: We are using primarily sata drives. Where we find that they aren’t fast enough, we generally provide a second sever for file storage with those drives.
Question: A lot of DVD burners do support DL, but good luck finding the media! I have found it easier to find Blu-Ray burnable media than DVD DL media…
Answer: Good tip. We’ve found the same thing. The USB setup is very simple and so much faster.
Question: Can we build SBS 2011 and fully configure it with our unique “recipe” (GPOs, tweaks, setup wizards, etc) then image it? Could we then apply that “custom” image to new servers and then tweak a few things for that specific customer? And… If we build that base as “company.lan” can we change that after that fact to “xyzcorp.local”?
Answer: You can’t do all of those things, but you can do most of them. This is a pretty complex questions. We’ll talk about it at the end during Q&A
Question: Do i need an trial key, for trial period of SBS2011. (Have downloaded from MSDN)
Answer: It will let you run without a key for a few days. If you have an MSDN subscirption you can get a key from your downloads section.
Question: I have a customer installation with my ISO file. But need an trial period, before I get the key to my customer. OEM editions have not been released yet in Norway.
Answer: You should be able to install without a product key when you run the install and then add the product key later.
Question: So i dont need an trial key for getting 60days trial
Answer: There is no place in the install where a key is asked for, so no trial key is needed. I’m not certain about the timeframe allowed before a key must be entered, but it doesn’t prompt for a key during install.
Question: Are you all using HP or Lenovo/IBM hardware or whitebox/HAAS hardware for SBS 2011, in particular I’m interested in the RAID controller and any out of band management you deploy.
Answer: Eriq’s company is using Dell hardware for hardware. We’ll discuss this more in live Q&A.
Question: I have started an SBS2011 server installation with 8GB ram for a customer, and i am worried that this will be a problem for my customer. Should i sell more RAM or keep on with 8GB?
Answer: If the customer is very small, it might be OK. But you will find it slow. I would recommend a few more GB minimum. Ram is pretty cheap these days.
Question: It is a 4user business with a simple MySQL database for an LOB software
Answer: I think I would still get them another 4GB. It will help the server have a long healthy life
Question: Most of customers coming from SBS2003. Firewall recommendations and why… What to look for?
Answer: We are using Calyptix. I would recommend a UTM appliance of your choice because attacks today come from all angles.
Question: We use HP 410i with 512MB FBWC controller + 4x146GB SAS 10K disk in RAID5. Choose BBWC or FBWC on the controller. Makes it much faster.
Answer: Thanks for the recommendation.
Question: When we virtualise SBS & a seperate SQL box then we have a mix of SATA and SAS.
Answer: Thanks for the recommendation
Question: If we are okay with using “company.lan” as the internal domain for all customers can we use the “confgiure and image” method and just change the external domain name “xyzcorp.com” using the wizard (in other words not run that wizard before imaging). In other words if we are okay with a generic internal domain name for AD are there any other reasons we cannot build an image of SBS 2011 for use in deployment?
Answer: This is a much better choice. We haven’t tried it. Do some experimentation first and keep us posted on how it goes.
Question: Is there anything new in SBS 2011 that better supports Macintosh / Ipad / Iphone Os es?
Answer: answered live
Question: Amy, how much cache ram on the raid controllers for your SATA installs?
Answer: 256 or 512mb
Question: Teaser question re migration: it sounds like I need another physical server even when I have a perfectly capable box currently running sbs2008. Is this true????
Answer: There’s no in place upgrade. This is function of Exchange. So you do need two boxes. We either replace the existing hardware or if we reuse it we virtualize the SBS 2008 on a temporary server.
Question: Does Remote (RWA) work from Safari Browser?
Answer: It depends..Yes but you can’t remote control a machine in the domain.
Question: Have you tried doing an install on an SSD? If so what RAID options did you choose, if any? Since SBS 2011 is based on Windows 2008 R2, it supports TRIM to increase SSD life span. I have my production SBS 2011 running on 2008 R2 Hyper-V and the virtual disk on an SSD and the performance is amazing! I’m not doing this for customers yet but was just wondering if you guys have played around with SBS on any type of SSD structure yet.
Answer: We have not. But this is great information for everyone. Thanks for sharing.
Question: Will handout or recording of the slides be available?
Answer: The webinar has been recorded and will be available on the site. Most likely there will be a subscription available for supporting materials later.
Question: Are there any documents I should follow or that Eriq can recommend for Macintosh join on SBS network SBS 2011?
Answer: I’ll be doing a post on Macintosh connectivity to SBS 2011 in the near future (read weeks, not days :) )
Question: Have you found a way to disable the remote file share access that shows up in the remote web?
Answer: answered live
Question: Do you feel it is too soon to put SBS 2011 into a client production environment?
Answer: Eriq does not, we have a number of proposals out right now for SBS 2011 migrations.
Question: Thanks. That’s too bad than you can’t filter somehow. Just like the remote control server only shows up for admins, not normal remote users.
Answer: Yes, we’ve bugged it for a future update, but no idea if/when it will be updated.
Question: This might have been discussed earlier, but when clients with SBS 2003 need a hardware refresh and aren’t ready for SBS 2011 yet, do you typically P2V it? If so, what tech do you use?
Answer: I use Storagecraft backup restore into a MS hyper-V machine. MS P2V should work equally as well
Question: Any difference in specs for virtual installs?
Answer: Not much experience with this yet. We expect that the requirements will be higher for virtual servers.
Question: Thanks – Great Job, as usual!!!
Answer: You’re welcome!

0 Categories : Amy Babinchak, Eriq Neale, Q&A, SBS 2011, Webinar
Jan
17

History repeats itself. Install this hotfix if you run AV on SBS 2011

by steve

Slow Network Performance on SBS 2011

I can't believe we are having a re-run of two years ago, but if you have deployed SBS 2011, you need to run this hotfix if you are running antivirus software on your Small Business Server. Go to http://support.microsoft.com/kb/2493361/ to get it. For some reason unknown to me, the Windows Server Team felt that something released in Server 2008 SP2 wasn't important to put back into Server 2008 R2. I'm glad I have low blood pressure normally, because it just raised a few notches when I found this out.

Categories : SBS 2011
Jan
12

Third Thursday Webinar: Managing SBS 2011 Installation

by amy

Post to Twitter Post to Facebook Post to StumbleUpon

Eriq Neale and Amy Babinchak will present this months Third Thursday webinar on SBS 2011 Installation. This is the second in what will be a complete series on Small Business Server 2011.

Topics to be covered:

  • Specifications and real-world specifications
  • Using the Answer file
  • Booting from USB
  • Verify the installation
  • and more

Please plan to join us. This webinar series is scheduled each month for the Third Thursday at Noon Eastern time. That’s January 20th.

Mark your calendar now.

https://www.livemeeting.com/cc/harborcomputerservices/join?id=RBSQ5R&role=attend&pw=jG*xS6n%22F

—–

Click to hire us.
We’re Third Tier. We provide advanced Third Tier support for IT Professionals.
Third Tier Get Support BlogFeed Blog Twitter Twitter Facebook Facebook LinkedIn LinkedIN

 

1 Categories : Amy Babinchak, Eriq Neale, SBS 2011, Webinar
Jan
5

Connecting a Windows Phone to Exchange

by amy

Post to Twitter Post to Facebook Post to StumbleUpon

 

Microsoft’s Windows Phone is modernized with a completely new user interface that may not be familiar to those of you that have resisted the iPhone and Android. The Windows Phone interface follows a familiar pattern once you get to know it.

PhoneHome

Connecting to your Exchange server (Exchange 2007 or Exchange 2010), whether local or hosted (Hosted Exchange, BPOS, Office 365) is one of the first tasks that you’re likely to want to perform on your new phone.

How to setup your phone if you have AutoDiscover:

If your Exchange server is configured with autodiscover, then you can use the basic form to connect your phone to Exchange. (if your server is not configured for autodiscover and you would like to, please see our post http://www.thirdtier.net/2009/02/setting-up-an-external-autodiscover-record-for-sbs-2008/  Autodiscover is a wonderful feature for Exchange and works for outlook anywhere too.) This form only requires your username and password. Windows Phone will then attempt to locate your account information and will begin synchronization with default settings. This is a quick and easy setup. Later you should customize your sync options using the steps outlined below for manual configuration of your Windows Phone.

How to setup your phone manually:

  1. From the Home Screen press the arrow at the top right corner to expose the list of applications installed on your phone and select Settings.
  2. In the Settings menu select email & accounts
  3. In the email & account menu select add an account and choose Outlook as the type
  4. In the Outlook Settings menu fill out the form presented.
    1. Account name is for your information only. Type the name you would like to assign to this account. The default is Outlook
    2. Download new content. Select the frequency with which you would like the phone to sync with your server.
    3. Download email from. Select the range of old email that you would like to have on your phone. Options are selectable for 3 days to forever
    4. Check the boxes to chose what type of data you would like to sync
    5. User name. Enter the username you log into your server as
    6. Password. Enter the password you log into your server as
    7. Server. Enter the public name of your server
    8. Check the box if your server requires SSL
    9. Press the check mark at the bottom of the screen when you are ready to save your settings

—–

Need more help with this or some other sticky situation? Click to hire us.
We’re Third Tier. We provide advanced Third Tier support for IT Professionals.
Third Tier Get Support BlogFeed Blog Twitter Twitter Facebook Facebook LinkedIn LinkedIN

0 Categories : Amy Babinchak, Phone
Jan
4

Congratulations MVP Awardees!

by amy

Post to Twitter Post to Facebook Post to StumbleUpon

Third Tier would like to congratulate all of the Microsoft MVP Awardees. It is a great honor to be recognized as one of the worlds best. The MVP program selects for two things: technical skill and generosity. What it ends up with are the very nicest IT people you could ever hope to meet.

Congratulations to one and all.

—–

Need more help with this or some other sticky situation? Click to hire us.
We’re Third Tier. We provide advanced Third Tier support for IT Professionals.
Third Tier Get Support BlogFeed Blog Twitter Twitter Facebook Facebook LinkedIn LinkedIN

0 Categories : Announcement

Search

Support

Third Tier provides advanced support services to IT Professionals. Learn about what we do at http://www.thirdtier.net or click on the support icon below to chat with one of our support representatives.

Third Tier
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress