Archive Page 2
February 24th, 2010 by Michael
At some point, I had a desire to list all the computer accounts for any server OS in Active Directory. I am pretty sure that I did a search and found the script below, but I don’t remember where, so whoever wrote it doesn’t get credit this time…
$strCategory = “computer”
$strOperatingSystem = “Windows*Server*”
$objDomain = New-Object System.DirectoryServices.DirectoryEntry
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.Filter = (“OperatingSystem=$strOperatingSystem”)
$colProplist = “name”
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}
$colResults = $objSearcher.FindAll()
Write-Host $colResults.count
foreach ($objResult in $colResults)
{
$objComputer = $objResult.Properties;
$objComputer.name
}
If you change the $strOperatingSystem = “Windows*Server*” to something like $strOperatingSystem = “Windows*” it will return all computer accounts that have “Windows” in the Name field on the Operating System tab of the properties of the AD object:

February 24th, 2010 by Michael
So a TechNet wiki is coming, as stated by Keith Combs here:
three big things we focus on for all TechNet scenarios are Content, Discoverability, and Participation. We really want to invite participation from everyone and what better way to combine that with discovery and content than to use Wiki technology?
Later this year TechNet and the Server & Cloud Division will partner to launch the new TechNet Wiki.
…
We believe a public wiki for technical content on TechNet has the potential to be a big step forward in all three areas:
- For content, while Microsoft teams write some great content, we cannot possibly author all the content customers need to be successful, and a wiki that offers content from the community will increase the breadth and depth of technical content available for IT Pros.
- For participation, the wiki is a great new way for any IT pro to create and share technical knowledge, engage with other technical people and with Microsoft, and build an identity and reputation within the TechNet community.
I used the word "potential" above because Microsoft cannot succeed with the TechNet Wiki on its own – success ultimately depends on the direct engagement, support, and ongoing feedback from the IT community.
I am not sure how I feel about this. I like Wikipedia, and OFTEN reference it for information on non-work related topics. We use a SharePoint wiki for a lot of our documentation where I work, but I don’t find it to be as useful as I would like, because for some reason, I don’t like the interface. One of the big issues I have with it, is the inability to insert pictures directly in the article during the creation of the article. You have to upload the picture (such as a screenshot) separately and then link to it. That doesn’t seem very efficient to me.
With this blog, I use Windows Live Writer. It allows me to take a snip like this:
and paste it right in the text. When I publish, it is auto-magically uploaded and linked to my post. I think the other issue that I have is that I am afraid I would take it personally if someone felt the need to correct something I posted to a wiki.
I guess I am going to have to work on that. Both for the wiki at work and (maybe) for the TechNet wiki. There are those occasions when I actually have useful knowledge to share…
February 8th, 2010 by Michael
So the System Center guys have provided a place for people who work with System Center products to see a conglomeration of posts from various professionals who have registered to Blog about System Center products. How fun…
Blog Posts by System Center Influencers

Get the feed.
Below are the most recent posts from several of the members of the System Center Influencers Program. Note that Microsoft does not review the content or endorse it in any way; we present this content in a feed form for your information and convenience. (In the event that the feed refuses to render due to the flakiness of the third-party feed service, simply use the feed embedded in the RSS icon above.)
Nexus SC: The System Center Team Blog : Blog Posts by System Center Influencers
January 21st, 2010 by Michael
Situation: I have a 32bit file server running Windows Server 2003. I have a new 2008 R2 (x64) file server running on Hyper-V. Did I mention that the R2 server is on Clustered hosts?
This is all simple. Just drop the LUNs from the file server, give them to the cluster and assign them as pass through disk to the guest OS. Simple…
Except, I kept getting the following errors when I try to do the import:
An online pack already exists.
The operation failed, because an online pack object already exists.
The provider encountered an error while merging two packs.
I mean really… what does all that mean. I couldn’t find anything pertinent in my searches, I tried working in Diskpart, and got some of the same errors.
After lots of searches, I couldn’t find anything to help. So I opened a ticket with Microsoft. I got a very helpful person who told me that it basically sounds like a driver issue, but he couldn’t say for certain. He couldn’t find much on it either.
So on a whim, I moved my test LUN from my production file server to another 2003 server. That worked just fine, so I then moved it from there to the 2008 R2 machine that I had been working with. That worked just fine. Weird…
So I checked the driver for the production file server:

and compared that to the other 2003 server:
![clip_image002[4] clip_image002[4]](http://nukeitmike.com/blog/wp-content/uploads/2010/01/clip_image0024_thumb.jpg)
As you can tell, the culprit seems to be an outdated driver on the current file server. Seems I don’t keep things as up to date as I should.
November 19th, 2009 by Michael
I was trying to change from a “Legacy Network Adapter” to a “Network Adapter” on one of my Hyper-V VMs. I added the “Network Adapter” and removed the “Legacy Network Adapter”, and started the machine up. When the machine came up, it wouldn’t connect to the network. Having seen this before I knew exactly how to fix it. Run the Integration Services install again. I did that, and got:
An error has occurred: One of the update processes returned error code 61658
So, being the smart guy that I am, I rebooted and tried again. Same result. The hits I got on google suggested that I was still running an CTP or Beta, but I am running the RTM version (2008 Hyper-V, but not R2 on this one).
I was logging into this machine with a Domain account, but it wasn’t on the network. We use some restrictions on the server desktops and redirect application setting and such, so I thought that might be related.
Here is what worked:
I added back the Legacy Network Adapter (leaving the non-Legacy adapter as well)
I installed integration services again (and it worked just fine)
I removed the Legacy Network Adapter
Now the machine is working just as expected.
November 17th, 2009 by Michael
I was installing the DPM 2010 Beta (finally) and had an issue trying to get the SQL 2008 to install. Finally figured out that I had the install files stored too deeply in a network share. I figure this out by running the SQL install directly and when it when to check prereq’s it had an error on one section and when you click for more info this is what you get:
Rule "Long path names to files on SQL Server installation media" failed.
SQL Server installation media on a network share or in a custom folder can cause installation failure if the total length of the path exceeds 260 characters. To correct this issue, utilize Net Use functionality or shorten the path name to the SQL Server setup.exe file.
So, I moved it to a shorter path and it installed just fine.
October 13th, 2009 by Michael
So I am a bit late realizing this, but the Beta for DPM 2010 is available now on the Connect site. I haven’t read anything on it yet, so mainly I am just posting this to make myself look into it.
https://connect.microsoft.com/Downloads/DownloadDetails.aspx?SiteID=840&DownloadID=22070
October 9th, 2009 by Michael
We use a couple of IBM DS4700 storage controllers at my work, and I had one configured with a Windows 2008 Hyper-V cluster. The cluster was for testing (I am building a new one on R2 for production) and when I went to remove everything that had been used for testing, I came up against a problem:
Error 219 – The operation cannot complete because the logical drive has a persistent reservation placed on it. Please release the reservation at the host and then retry the operation.
Well, maybe I should have told the cluster to go away before I started deleting the storage, but I didn’t so, that seemed to be a bit of a problem. I did some google searching, and that was very frustrating, because although I did finally find a reference to it, the reference seemed to allude to the necessity of calling IBM support to correct the problem. If you found this post, and you are having the problem, please be comforted by the fact, that you DON’T have to call for support. I am running Storage Manager 10 and the latest firmware, and if you go to the Advanced –> Maintenance –> Persistent Reservations… you get this:
and if you click in the “View associated registrations” box it will show you which host/adaptor holds the reservation. But the really cool part is you can highlight the LUN you want to remove the reservation from and click “Clear”.
September 22nd, 2009 by Michael
I have written a lot of scripts that use .txt files to read or store data, but I have a need to read some information from an .xml file. This could be done by treating the file as a simple txt file, but it would require some pretty good filtering that is already a part of the xml file. A quick search helped me locate this article:
http://blogs.msdn.com/kalleb/archive/2008/07/19/using-powershell-to-read-xml-files.aspx
Which contained the key to helping me with what I needed to do. The specific piece I needed was in Lesson 2:
Lesson 2:
Read data from an XML-file.
The XML-file that I’m going to read from has the following structure:
<Users>
<User>
<Name>Kalle</Name>
</User>
<User>
<Name>Becker</Name>
</User>
</Users>
Reading data from an XML-file is really easy in PowerShell! Use this command to load the file into an variable:
PS C:\Tmp> [xml]$userfile = Get-Content Accounts.xml
When the xml-file is loaded you can type “$userfile.U” and press tab to get auto completion!! It’s a breeze.
The trick is that you have to actually READ what is in front of you. The key here is to let PowerShell know that you are reading an xml file, and that is done by placing [xml] prior to getting the content. I missed that the first six times I read this and couldn’t figure out why I wasn’t getting the results I expected.
September 4th, 2009 by Michael
One of the things that we spend a lot of time on is trying to keep track of what servers have enough free space. We have a lot of different tools to check drive space, and we even use some of them from time to time. We have a pretty complicated system created by Rickey that creates a nice webpage, with highlighting for problem areas (percentage change from day to day, current percent free, etc.) It even puts the info into a database for historical reporting.
We don’t store or report on VMs currently, mainly because we were trying to keep track of total REAL disk used. VMs often don’t use as much as they think they do, so that would skew the results, as well as the fact that we are reporting on the hosts.
All of that is the reason that Patrick asked me to come up with some other tool to use for the VMs so I happened to find a few pieces of PowerShell script that I managed to put together to do a pretty good job of providing some of the info we wanted, and I thought I would share that with the 2 people who read my blog.
$servers = Get-Content servers.txt
#Open Excel and create a new workbook and worksheet
$ExcelSheet=New-Object -comobject Excel.application
$WorkBook=$ExcelSheet.WorkBooks.add(1)
$WorkSheet=$WorkBook.WorkSheets.item(1)
#Header row
$WorkSheet.cells.item(1,1)=”Computer Name”
$WorkSheet.cells.item(1,2)=”Disk Device ID”
$WorkSheet.cells.item(1,3)=”Volume Name”
$WorkSheet.cells.item(1,4)=”Size (GB)”
$WorkSheet.cells.item(1,5)=”Free Space (GB)”
$WorkSheet.cells.item(1,6)=”Space Used (GB)”
$WorkSheet.cells.item(1,7)=”Percent Used”
$i=2
ForEach ($ComputerName in $servers)
{
echo "Server Name : ", $ComputerName
$Disks = gwmi –computername $ComputerName win32_logicaldisk -filter "drivetype=3"
foreach ($Disk in $Disks)
{
$Size = "{0:0.0}" -f ($Disk.Size/1GB)
$FreeSpace = "{0:0.0}" -f ($Disk.FreeSpace/1GB)
$Used = ([int64]$Disk.size – [int64]$Disk.freespace)
$SpaceUsed = "{0:0.0}" -f ($Used/1GB)
$Percent = ($Used * 100.0)/$Disk.Size
$Percent = "{0:N0}" -f $Percent
$WorkSheet.cells.item($i,1)=$ComputerName
$WorkSheet.cells.item($i,2)=$Disk.deviceid
$WorkSheet.cells.item($i,3)=$Disk.volumename
$WorkSheet.cells.item($i,4)=$Size
$WorkSheet.cells.item($i,5)=$FreeSpace
$WorkSheet.cells.item($i,6)=$SpaceUsed
$WorkSheet.cells.item($i,7)=$Percent
$i=$i+1
}
}
#Show the results
$ExcelSheet.visible=$true