DRIVE EFFICIENCY THROUGH AUTOMATED IT.
SAVE COST THROUGH CONSOLIDATION OF IT.
WANT TO KNOW MORE ABOUT STRATEGIC CONSULTING CLICK HERE.
MICROSOFT / RISUAL HYPER-V CLOUD EVENT 22ND MARCH 2011 CLICKHERE.

Archive

Posts Tagged ‘Windows Server 2008’

Windows Server 2008 R2–Backup and restore printers

December 9th, 2011 paulw Comments off

Here is a simple command line that can be saved as a scheduled task that can be used to backup all of your printer settings in Windows Server 2008 R2:

CD %WINDIR%System32SpoolTools Printbrm.exe -s \<sourcecomputername> -b -f <filename>.printerExport

To restore the settings to another server run the following command:

Printbrm -s \<destinationcomputername> -r -f <filename>.printerExport

Cheers

Paul

Delete files by date

October 4th, 2011 paulw Comments off

Here is a command line that can be saved into a batch file that will delete files that are over 30 days old in a certain path:

forfiles /p "C:FOLDER" /d -30 /c "cmd /c del @path"

This can be used to clean up folders by deleting files that are older than the 30 days or however many days you want to set it to.

When saved as a batch file you can schedule it to run at certain times to clean up folders such as backup files or reports that are no longer needed.

Cheers

Paul

The download of anti-spam updates failed with an error

September 20th, 2011 paulw Comments off

We were having a few SCOM alerts each day to inform us that the anti spam updates that usually come through Windows Update were failing to install on a customers Exchange 2007 server that was running on Windows Server 2008 SP1.

Looking in the c:WindowsWindowsUpdate.log file I could see that there was an error with BITS (Background Intelligent Transfer Service) which Windows Update uses to download updates. This led me to use the bitsadmin tool to see if there was any downloads stuck:

1. Open a command prompt as administrator

2. Type in the following command and press enter:

bitsadmin /list /allusers

3. If there any lines in the output such as the following then we need to reset the jobs:

{04D0B991-54E3-41C4-B475-572D9E31BFE5} ‘WU Client Download’ SUSPENDED 0 / 1 0 / 13352278

 

To kill off the jobs is not as simple as it seems as even with an administrator account I could not kill off the jobs giving me an unable to cancel error. The task had to be run as system as a scheduled task:

1. Open up notepad and put in the following line:

bitsadmin /reset /allusers

2. Save the notepad file back as a batch file by save as and giving it a name with the extension .bat

3. Open Task Scheduler and create a new task that runs that batch file and put it to run at a certain time or manually.

4. Before the task runs we just need to change the user account that it runs under system by clicking on Change User or Group button, typing in system as object name and clicking on Check Names:

image

5. Either schedule the job to run or right click on the job and select run now.

Once the job has run then you can again run the bitsadmin /list /allusers and you should get an output showing no jobs:

image

The update for the Anti Spam updates should then install without any problems and you should no longer receive this alert.

Hope this helps.

Cheers

Paul

HRESULT: 0x800f0818 Unable to add/modify Roles or Features through Server Manager or Powershell after installing updates

August 11th, 2011 Ashley Moore Comments off

After installing numerous Windows Updates, usually when bringing a newly installed server up to date on patches, you may recieve the following error in server manager:

Error: Unexpected error refreshing Server Manager: Exception from HRESULT:0x800F0818d

This issue occurs when corrupt .mum or .cat files are present after the extraction and installation process of windows updates.

To reolve this we need to complete a few steps

1. Download and run the Microsoft Update Readiness Tool from http://support.microsoft.com/kb/947821 once it has run check the log in C:WindowsServicingPackagesCheckSUR.log

2. You should see errors resembling:
CBS MUM Corrupt 0×00000000 servicingPackagesPackage_for_KB978601~31bf3856ad364e35~amd64~~6.0.1.0.mum Expected file name Package_for_KB978601_server~31bf3856ad364e35~amd64~~6.0.1.0.mum does not match the actual file name

and further down

Unavailable repair files:
servicingpackagesPackage_for_KB978601~31bf3856ad364e35~amd64~~6.0.1.0.mum

3. There may be more than one problematic update so make a note of all of them, you will then need to download these KB’s and unpack them using the following commands:

Expand -F:* UpdateKB978601.msu C:Directory

This then shows a cat file which also needs to be unpacked:

Expand -F:* UpdateKB978601.CAB C:DirectoryCAB

4. You will need to grab the two files, one extension .mum and one extension .cat, then rename them making sure they are exactly as was displayed in the CheckSUR.log file. You will then need to copy them into the C:WindowsServicingPackages directory overwriting the existing ones.

These steps should resolve the issues and you should be able to add/remove Roles and Features again :)

Filter event viewer service control manager events using XML

May 19th, 2011 paulw Comments off

Had a problem with a site in which I wanted to see if the event viewer had logged any instances of the Exchange System Attendant service stopping. Unfortunately these were buried in a long list of other services that were constantly starting and stopping under event id 7036.

What I had to was to edit the XLM query manually in “Filter Current Log…”. I then put in this query to show me every time the service had entered the running state:

<QueryList>
  <Query Id="0" Path="System">
    <Select Path="System">*[System[(Level=4 or Level=0) and (EventID=7036)]] and *[EventData[Data[1]=‘Microsoft Exchange System Attendant’ and Data[2]=‘running’]]</Select>
  </Query>
</QueryList>

This game me the filtered list of service events that only applied to when the Microsoft Exchange System Attendant service had entered the running state:

image

You can just copy and paste the XLM above to give you this output or simply change some of the options to custom it to look for any events for a particular service that you want to see.

If you want to get some more parameters to search then simply double click on the event ID that you want to filter, click on the details tab and select XLM view. This will give you a list of all of the details that you can search for:

image

Paul

Command line to find out if the OS is running 32bit or 64bit

April 28th, 2011 paulw Comments off

Here is a quick command line that you can run as any user that will tell you if you are running Windows 32bit or 64bit.

wmic OS get OSArchitecture

This should output something similar to this:

image

There is a PowerShell equivalent as well:

(gwmi win32_computersystem).SystemType

image

This may be useful for anyone who is using remote commands in PowerShell.

Paul

Windows 2008 R2 activation problem ( 0x8004FE2F , 0x8007232B on x64 servers)

July 22nd, 2010 Joe Comments off

Like the 100′s of times before,  you install Windows 2008 R2 on to a server , try activating it ,and get the error :-

0x8007232B – DNS name does not exist

then you remember to set the proxy settings.. you open internet explorer and change the proxy settings , you can now browse the internet,   and try activation again

but this time it still fails… that’s not supposed to happen, as you can access the web.  (also phone activation completely failed at this point too.)

This time it fails with code 0x8004FE2F

You find other blogs  on the internet, which suggest that its your proxy settings that have not been set,  and they are right but what they don’t tell you is specifically its Internet Explorer (64 bit) you need to set the proxy for. I had inadvertently set the IE (32 bit) settings previously.

Happy installations.

Windows 2008 System State Fails with Windows Backup installed and Enough Space on the drive

December 2nd, 2009 Daniel Davies Comments off

 

image

You may come across a few problems when using DPM or Simply just windows backup when trying to back up “System State” on WINDOWS 2008.

The first problem you may come across if you have a single drive is that System State will not backup to a critical volume by default. So you have to set the below registry key to allow this to happen.

“Registry entry to enable system state backups to critical volumes

To enable the system state backup files to be targeted to critical volumes, you must set the value of the AllowSSBToAnyVolume registry entry under the following registry subkey:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceswbengineSystemStateBackup

Set the value of this entry as follows:

Name: AllowSSBToAnyVolume
Data type: DWORD
Value data: 1

Note When this value is set to 1, system state backups to any volume are enabled. To revert to the default behavior, set the value to 0.”

You may have the issue we had recently also where the  above  regkey is already set to 1, windows backup was installed and there was enough free space, so no obvious reason why the backup should have failed.

But you will notice the below event errors at the same point the backup fails.

image

“EVENT ID 517

Backup started at ’02/12/2009 09:25:29′ failed with following error code ’2155348165′ ( There was a failure in preparing the backup image of one of the volumes in the backup set. ). Please rerun backup once issue is resolved.

EVENT ID 8193

Volume Shadow Copy Service error: Unexpected error calling routine ConvertStringSidToSid.  hr = 0×80070539.

Operation:
OnIdentify event
Gathering Writer Data

Context:
Execution Context: Shadow Copy Optimization Writer
Writer Class Id: {4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f}
Writer Name: Shadow Copy Optimization Writer
Writer Instance ID: {06ff818a-6da7-4d9c-920b-df9c6309748e}”

Fix

To fix this we had to do the following

1. Create a backup of the registry

2. Delete the following key HKLMSoftwareMicrosoftEventSystem{26c409cc-ae86-11d1-b616-00805fc79216}Subscriptions (leave the EventClass subkey)

3. Restart the server.

4. Run the “VSSADMIN LIST WRITERS” from command Prompt. This causes the regkeys to be recreated and rebuilds the VSS writers.

After this all started working.

 

image

Daniel Davies

SYSPREP a Windows 2008 Server Virtual Machine

October 19th, 2009 Daniel Davies Comments off

With Windows 2008 SYSPREP is actually included in the installation of the OS. The SYSPREP procedure on Windows 2008 is really simple.

First navigate to “<system root>System32sysprep”

image

If you run sysprep.exe a wizard should pop up.

image

If you select the above options and make sure to tick generalise, to make sure all SID’s get regenerated. Once the machine has shutdown, you will be ok to copy the SYSPREPED VM’s VHD onto multiple VM’s and not face any SID issues.

Daniel Davies