Friday 20 January 2017

How to Reset or Remove Windows Activation/Remove license key using command

I am writing about how to Reset or Remove Windows Activation/Remove license key using command. It will work for window operating system all versions. This is very important for any of admin to make sure before formatting any of system remove license which exist in the systems or activated the same.
If we are formatting system or removing before license, it may cause you to activate the system back with same License key. Like if we are using OEM OR Multiple activation key and doing above without following the same. We will be getting error like “you have reached multiple activation limit” or “Unable to activate the windows with entered key.”
See below URL for activation issue error code and details:


So below are the steps to remove activation key from the system:
  • Login to the system with admin account and open cmd with Run as admin rights.




  • slmgr /upk : It stands for uninstall product key. The /upk parameter uninstalls the product key of the current Windows edition. Once this command will execute we need to restart, the system will be in an Unlicensed state unless a new product key is installed.
  • Enter slmgr /upk and Hit enter then wait for this to complete. This will uninstall the current product key from Windows and will move windows to unlicensed mode.


  • The /cpky option removes the product key from the registry to prevent this key from being stolen or taken by malevolent code.
  • Now enter slmgr /cpky and hit enter then wait for this to complete. Once this command will execute, this will remove the product key from the registry if it's still there. Below is the screen shot for the same result would be on the screen:


  • Move to the next enter slmgr /rearm and wait for this to complete. This is to reset the Windows activation timers so the new users will be prompted to activate Windows when they put in the key.
  • Once all done above, we can see our windows actvation properties status will be showing as not availble


Thanks ☺

Thursday 19 January 2017

How to Import and Export Virtual Machines in Windows Hyper-V Server

Today I am writing about “How to Import and Export Virtual Machines in Windows Hyper-V Server” step by step with screen shots.
As we are knowing now a days there is trend for Virtual servers, using virtual server we can save Money, Administrator tasks, Instead of using Host server, we can use our server on virtual hosted server, the servility & reliability of Hyper v server is better than hosted server.
As we have mentioned in my blog how to create and deployed the server on Hyper V servers, here I am going to describe about exporting and importing virtual machines.
Using import and export feature, we can create a new virtual machine with the same configuration of an existing machine in Hyper-V.
The exported virtual machine files or VHD are saved in the server, and we can be reused as many time as we want to create new VM.
So let’s start from begging and will be describing all details with screen shots:
  • Login to the server or system where hyper v machines is deployed.
  • Now search for Hyper V manager on the machine and click on the same to open

  • Once Hyper-V manager is opening, now click on the server to Connect Hyper-V server from Hyper-V Manger -> Right click on your virtual machine and select the export option.
  • If we have hosted the same in local server, it will be showing on the same; see below
  • Now select any one of the server which you want to export, and right click on the same. Here select Export option from the option came from Right click. See below:
  • It will open start with specify where you want to save the files, select your path by clicking on browse option and select path where you want to save the file.
Please note that you can export a virtual machine even when it is in “On” or turn off state. But prefer server should be down to export properly, also delete unwanted snapshot from the same to avoid the issue in importing the same.
  • Once all done, click on export and wait for time till exporting is done we can see the progress status from status bar.
  • Once exporting completing export operation we can see the virtual machine files in destination folder. This folder will contain Snapshots (In case if you have snapshot), Virtual Disks and Virtual machine files.
To import the VM, you need to copy all these three folders to the other server.
Import Virtual Machine in Hyper-V
Now we will discuss and see the steps to import the Virtual machines in Hyper-V Manager step by step with screen shots.
We are using Importing a virtual machine registers the virtual machine with the Hyper-V host. we can import back into the host, or new host and reuse the same server settings. If we are importing to the same exported server.
The Import Virtual Machine wizard also helps us fix mismatches that can exist when moving from one machine to another. This is commonly differences in physical hardware, such as memory, virtual switches, and virtual processors.
Below are the step by to import the same:
  • Copy the VM Files: We need to Copy the exported Virtual machine files and folders to your local server before we start import a virtual machine. See the above option how we have exported machine and saved the file.
  • Just for example we are trying to export windows server
  • Before importing virtual machine, we have Copied Windows server exported machine files from the machine to the server.
  • Import Virtual Machine Menu Option, now click in Hyper-V Manger and select the added server and right click on the same, we will getting option called Import Virtual machines
  • Once selected above option, we will get new Import virtual machine wizard.
  • First option, we will get before you begin, just select Next.
  • On the next page, we will get Locate folder here we need to select Virtual Machine by selecting browse option and select copied exported server.
  • Select the VM to Import: After selecting the path, it will show the machine name in import virtual Machine page. Select machine and click next.
  • Choose Import Type: on clicking next we will get option called choose import type.
Here we need select the Import mode as per your requirement. Please note that transferred files can be used again to clone machines only using “Copy The virtual machine (create a new unique ID)” option.
This has the following three options:
Register the virtual machine in-place
Restore the virtual machine
Copy the virtual machine (In our example, we are going to select this option)
  • Select above option and click on next, on the next page Select the Virtual Machine storage location path to store virtual machine files. Here accept the default values here. If we want to change the location, select the “Store the virtual machine in a different location” checkbox. Currently we are going with default feature.
  • Once clicked on next option we will get choose storage folders, here select the folder path to store Virtual machine Hard disk. This will be your storage location.
  • Now click on next to Finish the Import, here review the machine configuration selection, and click on Finish to complete the import process.

Thanks ☺

Wednesday 11 January 2017

How to Activate SharePoint Server Publishing in SharePoint Online

Today I am writing about How to Activate SharePoint Server Publishing in SharePoint Online, while activating this feature we are getting an error, Below is the error details:
Site
The feature being activated is a Site scoped feature which has a dependency on a Site Collection scoped feature which has not been activated. Please activate the following feature before trying again: SharePoint Server Publishing Infrastructure f6924d36-2fa8-4f0b-b16d-06b7250180fa
Web
The Site scoped feature being activated has a dependency on hidden Site scoped feature 'FeatureDefinition/15/22a9ef51-737b-4ff2-9346-694633fe4416' (ID: '22a9ef51-737b-4ff2-9346-694633fe4416'). Hidden features cannot be auto-activated across scopes. There may be one or more visible Site scoped features that auto-activate the dependent hidden feature.
Web
The Site scoped feature being activated has a dependency on hidden Site scoped feature 'FeatureDefinition/15/dffaae84-60ee-413a-9600-1cf431cf0560' (ID: 'dffaae84-60ee-413a-9600-1cf431cf0560'). Hidden features cannot be auto-activated across scopes. There may be one or more visible Site scoped features that auto-activate the dependent hidden feature.
To activate the same, we need to activate some of decency site features in SharePoint online site features option. I am going to show to active the same features step by step.

Before starting the same, we need to know what is SharePoint publishing infrastructure it provides an improved way to create and store information displayed through the site's web pages.
We need two features to activate on SharePoint site. The first feature is the SharePoint Server Publishing Infrastructure feature that we need to activate at the site collection features. Once the SharePoint Server Publishing Infrastructure feature is activated, then the SharePoint Server Publishing site feature can be activated on sites within the site collection.

To do the same below are the steps to fix the issue:
  • Login to the SharePoint online site and try to activate SharePoint Server Publishing, we will be getting below error:

  • Now to activate the same, we need to enable SharePoint Server Publishing Infrastructure feature from site feature of site collection or site page.
  • Select gear box from the left side of the screen and click on site setting option.
  • Here select site collection features from the Site collection Administrator.

  • We will getting site collection features wizard, here we need to find Publishing infrastructure feature.

  • From the feature page SharePoint Server Publishing Infrastructure: Provides centralized libraries, content types, master pages and page layouts and enables page scheduling and other publishing functionality for a site collection.
  • Once this feature will be get activate, go back to the site features page from site setting under the site actions.
Note: SharePoint server publishing infrastructure will take some time to activate the same.


  • Select above highlighted features SharePoint server publishing and activate the same, we will not be getting above error.
  • Once this will get activated we can see many new app will get created under the Site contents. Go to site contents page by clicking gear box and select site contents

  • Also there many more web part will get added on the web part wizard page.

Thanks