Change Product Key in Windows 8 or Windows Server 2012

To change the product key:

  • Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search.
  • In the search box, type Slui 3.
  • Tap or click the Slui 3 icon.
  • Type your product key in the Windows Activation window, and then click Activate.

Or:

Run the following command at the elevated command prompt:

slmgr.vbs /ipk <Your product key>

Shrink Log File in SQL Server 2008

Should you find that your log file has gotten to large due to not backing it up frequently you can use the following code to shrink the log file.

 

USE database_name
GO
ALTER DATABASE database_name SET RECOVERY SIMPLE
GO
USE database_name
GO
DBCC SHRINKFILE (database_name_log, 1)
GO
ALTER DATABASE database_name SET RECOVERY FULL
GO

SQL 2008 returns a table of shrinkfile related results plus the following confirmation:

(1 row(s) affected)
DBCC execution completed. If DBCC printed error 
messages, contact your system administrator.

Reset local git repository to be just like the remote repository HEAD

Setting your branch to exactly match the remote branch can be done in two steps:

git fetch origin
git reset --hard origin/master

VDP Checkpoint Error

Sometime we may encounter a VDP checkpoint error as shown by VMware via an alert message, like

PoCsVDP01 Alert VDP: [001] The most recent checkpoint for the VDP appliance is outdated PafoVM 12-3-2014 11:41:36

This error can occur if the system is booted and/or lost its connecion to the NAS where the disks are mounted.
The error can be investigated and (re)solved by running a check on the appliance via a SSH session to the VDP and executing the check procedure below.

Logon to the VDP using ssh.

  1. For logistics check VDP status (“dpnctl status“)  and used disks (“mount“)
  2. Stop VDP services , use “dpnctl stop” , allow some time to shutdown the Backup schedules and GSAN environment
  3. Unmount involved VDP disks (sudo mount /data?? disks where ??  can be 00 thru 06 residing on disk /dev/sd?1 where ? is a character.)
  4. Run “xfs-check”  for  each disk unmounted (“sudo xfs_check /dev/sd?1” where ? is a character from b to g)
  5. Remount automount  disks  (“sudo mount -a“) and check if disk of item 2 are mounted.
  6. Restart VDP services (“dpnctl start all“) , wait for checks, MCS GSAN and axionfs restarts.
  7. Stop the maintenance scheduler (“dpnctl stop maint“)
  8. Create an AVAmar checkpoint (“avmaint checkpoint –ava“) which generates an XML checkpoint.
  9. Enforce an integrity check (“avmaint hfscheck –full –ava“) , this can take a while 15 to 60min.
  10. Use/Check result (“avmaint hfscheckstatus –ava“) to follow result and until “status= Completed“..
  11. Restart maintenance scheduler (“dpnctl start maint“)

The alarm/error should now have been disappeared from vSphere.

FIXING THE “A FATAL ERROR OCCURRED WHILE TRYING TO SYSPREP THE MACHINE” ERROR

This occurs when a Windows 7 system has been sysprepped three times – KB929828. To overcome this, you will need to do the following:

1) Inside the Sysprep Unattend.xml file located at c:\windows\system32\sysprep, delete skiprearm=1 from the section. In order to edit the Unattend.xml file, you will need to slave the HDD onto a working machine in order to have access to a text editor for editing the file.

2) Under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\, set GeneralizationState to 7

3) From an administrative command prompt, type the following
msdtc -uninstall
msdtc -install

4) Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\, change SkipRearm to 1

5) disconnect the ethernet cable

6) Rerun the sysprep