Thursday, June 21, 2012

Promote 2008 Server Core to a Domain Controller

To promote the server to be a DC in your domain, enter the following command:

Dcpromo /unattend /replicaOrnewDomain:replica
/replicaDomainDNSName:mydomain.local /ConfirmGC:yes
/username:mydomain\administrator /Password:*
/safeModeAdminPassword:LetmeIn123

This will run dcpromo adding the server as a global catalog server to the mydomain.local domain. The Domain restore Mode password will be set to LetMeIn123. You will be asked to enter the domain administrator password when the command is run (by way of the /password:* command)

Allow the process to complete.  Once it does the server will automatically reboot and will be a domain controller.

Wednesday, June 20, 2012

Rename Windows Server 2008 Core

I ran into this today and here's how to do it.  Just don't try this on a domain controller.  This works for a member server only.

To rename the server we use the netdom utility. The command is
Netdom renamecomputer OldComputerName /newname:NewComputerName

Sunday, June 17, 2012

Fix VSS Errors Windows XP and Server 2003

Installing a backup device that uses a backup agent means the VSS writers have to be free of errors.  You can fix this by opening a command prompt (administrator level if needed) and typing in "vssadmin list writers".  This will run for a few seconds then list all of the writers on the system.  They should all show as "stable and ready".  If they are not, below are the steps you can take to fix this problem.

1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EventSystem\{26c409cc-ae86-11d1-b616-00805fc79216}\Subscriptions
3. On the Edit menu, click Delete, and then click Yes to confirm that you want to delete the subkey.
4. Exit Registry Editor.
5. Click Start, click Run, type services.msc, and then click OK.
6. Right-click the following services one at a time. For each service, click Restart:
  • COM+ Event System
  • COM+ System Application
  • Microsoft Software Shadow Copy Provider
  • Volume Shadow Copy
7. Click Start, click Run, type cmd, and then click OK.
8. At the command prompt, type vssadmin list writers, and then press ENTER.
9. If the VSS writers are now listed, close the Command Prompt window. You do not have to complete the remaining steps. If the VSS writers are not listed, type the following commands at the command prompt. Press ENTER after each command.
  • cd /d %windir%\system32
  • net stop vss
  • net stop swprv
  • regsvr32 ole32.dll
  • regsvr32 oleaut32.dll
  • regsvr32 vss_ps.dll
  • vssvc /register
  • regsvr32 /i swprv.dll
  • regsvr32 /i eventcls.dll
  • regsvr32 es.dll
  • regsvr32 stdprov.dll
  • regsvr32 vssui.dll  (does not work in Windows XP)
  • regsvr32 msxml.dll
  • regsvr32 msxml3.dll
  • regsvr32 msxml4.dll
Note The last command may not run successfully.
10. At the command prompt, type vssadmin list writers, and then press ENTER.
11. Confirm that the VSS writers are now listed.
12. At the command prompt, type vssadmin list shadows and then press ENTER.
13. Confirm that there are no errors listed.  On Windows XP you should see: No shadow copies present in the system.
14. Congratulations your machine should work again with any VSS compatible programs.

Wednesday, June 13, 2012

Group Policy Object to Block the Office File Validation Add-In

This "update" from Microsoft caused a lot of issues with files being opened (12 minutes for a 25K Excel 2003 spreadsheet) across a network.  Once the issue was isolated it wouldn't have made sense to go to all of the machines on every network affected and manually remove it.  Well you're in luck because here's a group policy template you can create and apply to your networks to prevent this update from causing you any problems.

msoffice2003validation.adm
CLASS USER
CATEGORY "Microsoft Office Validation Add-In"
CATEGORY "2003"
POLICY "Enable in Excel"
KEYNAME "Software\Policies\Microsoft\Office\11.0\Excel\Security\FileValidation"
VALUENAME "EnableOnLoad"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY
POLICY "Enable in PowerPoint"
KEYNAME "Software\Policies\Microsoft\Office\11.0\PowerPoint\Security\FileValidation"
VALUENAME "EnableOnLoad"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY
POLICY "Enable in Word"
KEYNAME "Software\Policies\Microsoft\Office\11.0\Word\Security\FileValidation"
VALUENAME "EnableOnLoad"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY
END CATEGORY
END CATEGORY

Tuesday, June 12, 2012

Backup Cisco Configs Using Putty


You can easily capture the configuration file from any network devices like Cisco Routers, Switches etc.. with putty. Follow below steps..


1. Launch putty and connect to your Cisco router/switch
2. Enter the user exec mode (router> enable)

3. Enter the terminal length 0 command (router# terminal length 0) in order to force the router to return the entire response at once, rather than one screen at a time.  This allows you to capture the configuration without extraneous −−more−− prompts generated when the router responds one screen at a time.
4. Right-click on the menu bar of the Putty screen and select “Change Settings
5. Go to Session and click on Logging, select “Log all session output
6. Click on Browse and choose the location and name of the file (I like to place my config file on my desktop – C:\Documents and Settings\Administrator\Desktop\config.txt)
7. Click apply.
8. Now enter the show run command (router# show run), then log out and see the output in config.txt on your desktop (or the location you chose).

This is a pretty simple thing to do and can be a real life saver if you happen to lose the config on a device.  It sure is a lot easier to copy and paste it back in instead of recreating it from scratch.  Cisco equipment is great but I have seen instances where the running config wasn't saved to the memory and after a restart it reset back to an old startup config or back to brand new (worst case).  

You now have the power!