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!

Monday, June 11, 2012

Configure an External Time Source in Windows Server 2008 R2


Configure an external time source

This computer is configured to hold the primary domain controller (PDC) emulator operations master role (also known as flexible single master operations or FSMO) in the forest root domain. This computer should not use itself as a time source. Configure an external time source as the authoritative time source for the forest, or configure a member domain controller as the time source peer. The configuration must be done manually. Perform the following procedure on the computer that is logging the event to be resolved.
To perform this procedure, you must have membership in Domain Admins, or you must have been delegated the appropriate authority.

To configure a manual time source peer:
  1. Open a command prompt as an administrator. To open a command prompt as an administrator, click Start. In Start Search, type Command Prompt. At the top of the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  2. At the command prompt, type w32tm /config /manualpeerlist:server,0x8, /syncfromflags:manual /update, where server is the name of the time source that you want to configure, and then press ENTER. ((I recommend pool.ntp.org for an Internet source))
  3. Restart the Windows Time service. At the command prompt, type net stop w32time & net start w32time, and then press ENTER.
  4. Resynchronize the Windows Time service client with the time source peer. At the command prompt, type w32tm /resync, and then press ENTER.
To learn more about the Windows Time service and related tools, see Windows Time Service Tools and Settings (http://go.microsoft.com/fwlink/?LinkID=42984).

Verify

To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.
To verify that the Windows Time service is synchronizing correctly:
  1. Open a command prompt as an administrator. To open a command prompt as an administrator, click Start. In Start Search, type Command Prompt. At the top of the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  2. At the command prompt, type W32TM /resync, and then press ENTER.
  3. At the command prompt, type W32TM /query /status, and then press ENTER. This command displays the status of the Windows Time service synchronization. The Last Successful Sync Time line of the output displays the date and time that you ran the W32TM /resync command in the previous step. Also, check the computer name that is shown as the Source. This should be the name of a domain controller (or an administrator-configured time server) in the same Active Directory domain as the local computer.
To verify that the Windows Time service synchronized successfully with its time source, confirm that Event IDs 35 and 37 appear in Event Viewer. If there was a recovery from a previous failure to synchronize with the time source, you also see Event ID 138, which indicates that the Windows Time service is synchronized correctly.

Renewing the Self-Signed Certificate: Exchange Server 2007


This is another perfectly written article that I have borrowed on this subject.  I got it from Exchangepedia and the author Bharat Suneja deserves all the credit.
Exchange Server 2007 issues itself a self-signed certificate for use with services like SMTP, IMAP, POP, IIS and UM. The certificate is issued for a period of one year.
The self-signed certificate meets an important need – securing communication paths for Exchange services by default. Nevertheless, one should treat these certificates as temporary. Although the self-signed certificates work perfectly well for internal SMTP communication between Hub Transport servers, and between Hub Transport and Edge Transport servers, it’s not recommended to use them for any client communication on an ongoing basis. For most deployments, you will end up procuring a certificate from a trusted 3rd-party CA (or perhaps an internal CA in organizations with PKI deployed).
Should you decide to leave the self-signed certificate(s) on some servers and continue to use them, these will need to be renewed when they expire — just as you would renew certificates from 3rd-party or in-house CAs.
 1. To renew the certificate for server e12postcard.e12labs.com, a server with CAS and HT roles installed:
Get-ExchangeCertificate -domain “e12postcard.e12labs.com” | fl
Note the services the certificate is enabled for (by default: POP, IMAP, IIS, SMTP on CAS + HT servers). Copy the thumbprint of the certificate.
Get a new certificate with a new expiration date:
Get-ExchangeCertificate -thumbprint “C5DD5B60949267AD624618D8492C4C5281FDD10F” | New-ExchangeCertificate
To create a new certificate with an exportable private key, use the PrivateKeyExportable parameter. For example:
New-ExchangeCertificate -PrivateKeyExportable $true
If the existing certificate is being used as the default SMTP certificate, you will get the following prompt. The default SMTP certificate is used to encrypt SMTP sessions between transport servers in your organization.
Confirm
Overwrite existing default SMTP certificate,
‘C5DD5B60949267AD624618D8492C4C5281FDD10F’ (expires 8/22/2008 7:20:34 AM), with certificate ’3DA55740509DBA19D1A43A9C7161ED2D0B3B9E3E’ (expires 1/28/2009 7:37:31 AM)?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is “Y”):
Type y to continue. A new certificate is generated.
Thumbprint   Services   Subject
———-   ——–   ——-
3DA55740509DBA19D1A43A9C7161ED2D0B3B9E3E   …..   CN=E12Postcard
The new certificate is generated and enabled. Examine the new certificate:
Get-ExchangeCertificate -thumbprint “3DA55740509DBA19D1A43A9C7161ED2D0B3B9E3E” | fl
2. The old certificate is enabled for IIS, POP, IMAP and SMTP. The new certificate generated using the above command is enabled only for POP, IMAP and SMTP – IIS is missing.
You can enable the certificate for IIS (in addition to any other services it may already be enabled for — it adds to existing values of the certificate’s Services property).
Note: Once you enable a certificate for a particular Exchange Server service, there’s no way to disable it (for that service). You must remove the certificate (if the certificate is CA-issued, export the certificate along with its private key before you do so), import it again and enable it for the services you need to. This is generally not a concern with self-signed certificates— you can generate additional self-signed certificates and optionally remove the old one, since there’s no CA interaction or costs involved.
Setting the Services parameter to None does not do anything in this case.
To enable the certificate for IIS:
Enable-ExchangeCertificate -thumbprint “3DA55740509DBA19D1A43A9C7161ED2D0B3B9E3E” -services IIS
3. Test services are working with the new certificate. If it works as expected, the old certificate can be removed:
Remove-ExchangeCertificate -thumbprint “C5DD5B60949267AD624618D8492C4C5281FDD10F”