Thursday, May 14, 2009

Changing the name of a SQL Server

After changing the computer name on a MS SQL Server you will need to run the following SQL query:

 

sp_dropserver <old_name>
GO
sp_addserver <new_name>, local
GO

Wednesday, May 6, 2009

Microsoft Virtualization

I’ve finally had the chance to play around with Windows Virtual PC and XP Mode. I must say, although it’s good to finally have an update to Virtual PC 2007, I can’t understand why Microsoft still refuses to implement certain functionality.

Windows Server 2008 R2 is only available in 64 bit, which is more than OK, but why the hell won’t Windows Virtual PC support 64bit guest systems?? You have the technology in Hyper-V, Microsoft, it’s not rocket science - why would you do this? All I want is the ability to boot a Hyper-V system on my desktop/laptop. One would think that, overall, it would be MORE work for Microsoft to have their server and client virtualization differ so much. I suppose I am stuck with VMWare Server on my laptop for another while.

On the other hand, I do like what I have seen so far in XP Mode. It’s basically a virtual XP machine which publishes its applications using RDP (any links to applications in the All Users start menu pop up in the Windows 7 start menu) – pretty neat. I can see it causing problems, though, when several applications need to be used simultaneously – XP only supports 1 RDP connection. It will be interesting to see if Microsoft makes any changes to that before the RTM.

Thursday, April 23, 2009

Using the Active Directory Recycle Bin in Windows 2008 R2: Part 2

 

To view the Deleted Objects container you will need to use ldp.exe

1. In the Options menu click Controls

2. In the Load predefined menu select Return deleted objects and click OK

3. Under Connections choose Connect and then Bind

4. Under View choose Tree and enter your domain

5. You should now find the container in the displayed tree.

 

You can use ldp to restore items but I find it easier to use PowerShell

Basically, to restore the user “Dave” use the following command:

Get-ADObject -Filter {displayName -eq "Dave"} -IncludeDeletedObjects | restore-ADObject

 

….wait a short while and the user should pop up again.

 

For more details see here

Wednesday, April 22, 2009

Using the Active Directory Recycle Bin in Windows 2008 R2: Part 1

The new recycle bin option in Windows 2008 R2 is a godsend for any admin who might accidentally delete an AD object by mistake. For some strange reason it’s not turned on by default and there are a number of steps needed to get it going.

Technet details most of it quite well but I thought I would create a quick and dirty guide for those of you just want to skip to the “good parts” ;)

1. Start a PowerShell console and type “import-module ActiveDirectory”

2. Raise the forest functional level to W2008R2 using PowerShell:

Set-ADForestMode –Identity domain.com -ForestMode Windows2008R2Forest

3. Enable the Recycling Bin using:

Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, DC=domain,DC=com’ –Scope Forest –Target ‘domain.com’

….that was the easy part.

In Part 2 I will explain how to actually view the deleted objects and restore them.

Wednesday, April 1, 2009

Forefront “Exceedingly compressed size” error

When uploading a compressed file to SharePoint or sending it via email (Exchange), users were getting the error “Exceedingly compressed size”.

It seems that Forefront will block any compressed file that has a file larger than 20MB. Unfortunately, this setting can only be changed in the registry. I found the following newsgroup entry on the subject:

The Exceedingly compressed size can be controlled by a registry key called MaxCompressedArchivedFileSize.
If any one object within the zip file has a COMPRESSED size of over the MaxCompressedArchivedFileSize (which is a default of approx
20MB) then Forefront will delete this file. The reason this was done was to prevent a denial of service attack where Antigen would be scanning an infinitely large file. The incident that you will see for this would be an "Exceedingly compressed size virus”.
If this is the reason why a message is getting caught you can do the following:

  • In the registry go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Forefront Server Security\SharePoint or (Exchange) Server
  • Add a DWORD Key of:  MaxCompressedArchivedFileSize (equaling 40,000,000)
  • Restart FSCController service

This is about 40 MB. This will allow the zip file itself to be about 40 MB before Forefront will take action on it.

Thursday, March 5, 2009

Installing Windows 7 from a USB Drive

Prepare the USB drive as follows

1. Diskpart
2. List Disk
3. Select Disk 1 (Replace 1 with number reflecting your USB Drive)
4. clean
5. create partition primary
6. active
7. format fs=fat32 quick
8. assign
Now, a drive letter reflecting the drive should appear. Copy the bits from the DVD to the USB Stick.
If you get errors along the way, simply remove the drive and repeat the process.

Boot from the drive and install normally :)

Wednesday, January 28, 2009

Uploading larger files to SharePoint (part 2)

After making the changes explained here I was able to upload larger files due to the IIS connection timing out. However, I ran into a similar problem a few days ago when trying to upload a 30 MB file to a Document Library and the previous solution didn’t seem to help.

My research eventually brought me to this Knowledge Base article. It seems that IIS 7 on Windows Server 2008 has a file size limit of 28 MB.

I’m sure Microsoft had a really good reason for adding these limits to their newest web server but I have been unable to find one. Would it be too much to ask for the SharePoint configuration tools to make these changes when it is creating the new site in the first place?

So I added the following to the web.config file in the virtual server folder and all was well:

<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="52428800"/>
        </requestFiltering>
    </security>
</system.webServer>

I had to add it to the end of the file (just before the </configuration> tag). Adding it to the beginning of the file caused an “Internal Server Error”.

Sunday, January 25, 2009

Error copying large files over the network

When backing up my Hyper-V VMs over the network. I was getting the following error message with one file that was 60GB in size:

Not enough server storage is available to process this command.

A quick Google search found several references, a number of which pointed to this. The current value on my (Windows Server 2003) file server was 18. After upping this to 21 and rebooting the server, the error disappeared and I could successfully copy my 60GB file over the network.

UPDATE:

After running into this again with other files I had to increase to 24.

Thursday, January 22, 2009

Taking ownership of a SharePoint site

The farm admins no longer automatically have access to all SharePoint sites. If you don't have access you can take ownership or take a role of "Secondary site administrator" by using this command:
 
stsadm -o siteowner -url http://sharepoint.test.com/sites/[sitename] -ownerlogin [DOMAIN\netID]

use the -secondarylogin switch to take ownership of the “Secondary site administrator” role.

Problems uploading larger files to SharePoint

Clients were getting an "unknown error" message when trying to upload larger files (> 10MB) remotely. It seems that IIS was timing out after a couple of minutes.
Making the changes to web.config detailed here solved the problem