TFS How to change the computer name or owner for a workspace

The owner and computer name of the workspace are not editable in Visual Studio 2010. However, you might need it when you renamed your machine or your account is renamed. To do this, open a Visual Studio Command Prompt (2010) from program files, and cd to your workspace, then run following

Change the computer name for a workspace

tf workspaces /updateComputerName:<OldComputerName> /collection:<CollectionURL>

You need replace <OldComputerName> to your actual old computer name and <CollectionURL> to your actual TFS collection URL.

Change the owner for a workspace

tf workspaces /updateUserName:<OldUserName> /collection:<CollectionURL>

Using SCVMM 2012 Cmdlets in PowerShell

SCVMM Cmdlets allow SCVMM admin/users to do everything they can do in SCVMM AdminConsole in windows PowerShell command line. In SCVMM 2008 R2, you can run following command in PowerShell to run SCVMM cmdlets.

Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager

But this does not work in SCVMM 2012 as SCVMM 2012 uses PowerShell module. For SCVMM 2012 now you need run following in PowerShell instead

Import-Module "C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\bin\psModules\virtualmachinemanager\virtualmachinemanager"

(This assumes that you have SCVMM 2012 installed on the default location C:\Program Files\Microsoft System Center 2012 )

The PowerShell cmdlets in SCVMM 2012 change a lot in SCVMM 2012, you can get a list of all SCVMM 2012 cmdlets by typing the following at the PowerShell command shell prompt

Get-Command -Module virtualmachinemanager -Type cmdlet

And you can run Get-Help on any of the cmdlets to get the syntax for that cmdlet.

Get-Help <cmdlet name> -detailed

Update: Microsoft has published the SCVMM 2012 cmdlets help to TechNet, check it out http://technet.microsoft.com/en-us/library/hh801697.aspx

How to install DotNet 2.0 or 3.5 on Windows 8

Windows 8 includes the 2.0, 3.5 and 4.5 versions of the .NET Framework. However, only 4.5 is available for immediate use after a clean install. The versions 2.0 and 3.5 of the framework are not installed by default. If you open the Add/Remove Windows Features dialog you’ll see the “Microsoft .NET Framework 3.5.1” listed, but disabled.

image

To install DotNet 2.0 or 3.5 on Windows 8,

  1. Go to Control Panel –> Programs –> Get Programs
  2. Click Turn Windows features on or off
  3. Check ‘.NET Framework 3.5 (includes .NET 2.0 and 3.0)′
  4. Click OK.

Continue reading

Install PowerShell From Command Line

To install PowerShell on Windows Server 2008 R2 or Hyper-V Server 2008 R2, following features needs to be installed.

  1. NetFx2-ServerCore
  2. NetFx3-ServerCore
  3. MicrosoftWindowsPowerShell

Because Powershell is built on DotNet framework, DotNet 2.0 and 3.5  has to be installed prior to PowerShell installation.

To install PowerShell from command line, run following from elevated command prompt

DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell

Or run following command if it’s an 64bit machine

DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore-WOW64 
DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore-WOW64 
DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell-WOW64 

Manual Uninstall Windows Desktop Search

Here is how to uninstall Windows Desktop Search (WDS) as it is not visible in add-remove programs

Manual uninstall Windows Desktop Search 3

  1. Click on the Start Menu, then Run.
  2. Type cmd in the box and click OK. This will bring up the command line.
  3. Type the following and press enter

    %windir%\$NtUninstallKB917013$\spuninst\spuninst.exe /q /promptrestart

  4. A box will now appear to confirm the WDS has been uninstalled and asks you to restart. Once you have restarted the PC WDS will be gone.

Continue reading

Remove Earlier Version of Windows boot option

After I upgrade from Windows XP to Windows 7, I see two options at boot up, one is to logon to Earlier Version of Windows, the other is Windows 7. The default option is boot into Windows 7.

There is a workaround to remove the Earlier Version of Windows option from the boot up screen so that it will boot straight into Windows 7 instead of asking users to choose which OS or waiting for 30 seconds and boot into Windows 7.

Continue reading

How to Install Hyper-V

What is Hyper-V

Hyper-V is Microsoft’s supported form of machine virtualization.  It allows you to run any number of guest machines on your host machine.  Each guest thinks it’s running on its own hardware, and is unaware that it’s just a simulation.

Hyper-V also provides an easy way to snapshot and rollback virtual machine to an old saved stage.

Hyper Installation Prerequisites

  • Operation System – Hyper-V is only available in 64 bit versions of Windows Server 2008 and Windows Server 2008 R2
  • Hardware – Processors should include a virtualization option. For example, Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V).

If you are not sure if your computer processor supports hardware virtualization, you can checkout Microsoft’s Hardware-Assisted Virtualization Detection Tool. The tool also checks if virtualization is enabled on the processor.

Continue reading

CopySourceAsHtml for Visual Studio 2010

CopySourceAsHtml is an add-in for Microsoft Visual Studio 2008 that allows you be able to quickly get your code as HTML from Visual Studio, just like being able to save it as a HTML file from the Save As dialog. It’s very helpful if you frequently post code to blog or send code in email.

I recently switched to Visual Studio 2010 and noticed this plug in is not ready for Visual Studio 2010 yet. Here is how you can get it work for Visual Studio before CopySourceAsHtml owner releases an official update to support Visual Studio 2010.

Continue reading

WordPress Keyword Description

In most of WordPress themes, there is not meta description and meta keywords handle. This result every page of site has a empty description and keyword in page header, which is not good from search engine’s perspective.

This can be workaround by installing plug All in One SEO. But for those who concern plugin will slow down their sites, here is a simple hack, all needs to do here is just adding a few lines in header.php.

Firstly open header.php, find this line <meta http-equiv=”content-type” content=”text/html; charset=<?php bloginfo(‘charset’); ?>” />

Continue reading