Tuesday, November 3, 2015

How to Remove Azure Account (Cached) using PowerShell

Recently I’ve done quite a lot of testing using various accounts to Azure.  All the commands are executed in the PowerShell ISE (Run ISE are Administrator).

The PowerShell should have the Azure Commands in it already.  If not, can download from here.

Select the Install from the Command-line tools


When I tried to Get-AzureAccount, it displayed more than one account and subscriptions


I need to remove the other subscriptions.  Therefore I perform as follow :


Execute the command as below :

  • Get-AzureAccount | format-table id

Once displayed, I execute to remove the account using

  • Remove-AzureAccount account-name

Note : Just replace the account-name with the account that needs to be deleted.

Another way is to remove all the accounts then re-add it back. 

To do this execute it as below to remove all the accounts :

  • Get-AzureAccount | ForEach-Object {Remove-AzureAccount $_.ID -Force}

To add the account that I’m working on, use :

  • Add-AzureAccount


keys : add azure account, remove azure account in cache, Azure powershell command line, command-line, azure subscription, AzureSubscription, get-azureaccount, remove-azureaccount

Friday, October 30, 2015

Azure–Token Error when execute from Powershell

I was doing the following :

  • Connect to a Azure from a Computer A
  • Execute the connection from PowerShell and connecting to Azure
  • Everything was ok.

Then I went to another location.  Executing the same process by connecting to Azure through the PowerShell.  I had no issue when executing the Add-AzureAccount but when I check I tried to get the subscription, I had the error as below :


After some finding, it seemed the token in the second location has expired.  Therefore I did the following :

  • The User I login is Administrator, therefore I go to :

C:\Users\Administrator\AppsData\Roaming\Windows Azure Powershell

Note : Change only the value in the PINK, with whatever credential you use to login to the PC.

  • Delete all the content in the directory


  • Proceed back to PowerShell and Add-AzureAccount
  • Then execute the Get-Subscription will display with no issue.

keywords : failed to refresh token, no service namespace, the server returned an error (400), AadAuthenticationFailedExecption, Bad Request

Thursday, October 8, 2015

DPM Reporting – An error has occurred during report processing

I hit an issue on launching the DPM reporting.  The DPM is functioning well except the reporting.  It’s the issue of the SQL Reporting settings.


It stated as :

An error has occurred during report processing. (rsProcessingAborted).
Query execution failed for dataset ‘DataSet2’. (rsErrorExecutingCommand)
Invalid object name ‘vw_DPM_Replica’.

Steps taken to resolve :

  • Launch the Reporting Services Configuration Manager in the DPM
  • Select the Report Manager URL on the left panel
  • Click on the URL on the right panel


  • Double-click on the DPMReporterDataSource
  • The Connection string is missing.
  • Minimize this screen


  • Create a file call dbtest.udl on the desktop (it’s a build in Windows)
  • Double click on it.


  • Once the Data Link Properties launch, Select the server name (using the drop down)
  • Use the Windows NT integrated security for the credential
  • Select the database (using the drop down)
  • Click Test Connection


  • Click OK once it’s successful


  • Right-click on the dbtest.udl and open with notepad


  • Copy the text from “Intergrated ….. “till the end of the line


  • Maximize the DPMReporterDataSource
  • Paste the copied text into the Connection string.
  • Click on Test Connection (may request to key in password again)
  • Once successful, click Apply.

Launch the DPM reporting with no issue occurred.

keyword : DPM, SQL, SRSS, Reporting Services, rsErrorExecutingCommand, rsProcessingAborted, dataset, query execution failed, invalid object name

Thursday, August 13, 2015

Azure Recovery Services–backup increased to 54TB limit

Earlier last month I shared on how to configure the DPM 2012 R2 with Azure Recovery (Backup Vault)

Microsoft Azure recovery Services team has officially released the backup per protection group from 1.7TB limit and now to 54TB limit on 12th Aug 2015.

You need to have the Azure Recovery Services Agent 2.0.8715.0 or higher in order for the backup to exceed the limitation of 1.7TB.


The news release is here.

keynote : Azure limit, ASR, Azure Recovery Services, DPM, SCDPM, storage limit.backup limit

Friday, July 31, 2015

Class 20409B - Server Virtualization with Windows Server Hyper-V and System Center


Just finished conducting a 5-days class on Server Virtualization using Hyper-V and System Center.  During class, I shared real life scenarios on how it was implemented, what are the obstacles they will face if planning were not done properly in the first place before rolling out.

Feeling happy that the students went back with knowledge.

keywords : 20409, Hyper-V, virtualization, backup, protection, VMM, virtual machine manager, dpm, azure, cloud, vmmlibrary,

Wednesday, July 29, 2015

System Center Virtual Labs


Let’s get our hands ‘dirty’ and I want to share the “Virtual Labs” that I found especially lots and lots of Systems Center labs.


The Website is in this link.

Let’s get started !!


keywords : systems center, virtualization, virtual, hyper-v, virtual machine, data protection, monitoring, SCOM, SCCM, Service Manager

Wednesday, July 22, 2015

Upgrade Windows Server 2012 R2 Evaluation Version to License/ Full Version

I had been doing a development or lab environment with Windows 2012 R2 Datacenter Evaluation copy.  Lots of work has been done.

Instead of reinstalling the entire copy of a Windows Server 2012 R2 Full Version and then reinstalling the application that I’ve been doing lots of work on it, I found a way to upgrade the Windows Server 2012 R2 Evaluation to a Full Windows Server 2012 R2.

(Note : This does not work for Domain Controllers running on evaluation license)

The following are the steps that I want to share.


The above shows the desktop of the Windows 2012 R2 that I’ve been testing and the 180 days is over.  I can do the slmgr.vbs –rearm , however had decided to go a full version and put into production since testing has been done for the application installed in this server.


Using the command slmgr.vbs /dlv would gather the information for the volume licensing.


As the arrow shows the information is an evaluation Windows Server 2012 copy.

Another way is to launch the command prompt in elavated (run as administrator).

Key in the command as below in the command prompt.

dism /online /get-currentedition


As you see, it shows the Current Edition is an Evaluation copy.

Next command is to check what version this current Evaluation can be upgrade to.

dism /online /get-targeteditions


If the evaluation copy is a ServerStandard, it will allow the option to upgrade to Standard Full or Datacenter Full edition

Next get the full license key ready. The next command will need to input in the command.  The command is as :

For DataCenter Edition key in as below :

dism /online /set-edition:ServerDataCenter /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula

For ServerStandard Edition key in as below :

dism /online /set-edition:ServerStandard /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula

Only make the changes in the Pink colour (input your valid license key).  In my example I’m using the DataCenter edition.


It will look something like the above displayed.  Press enter to execute.


Press Y to restart the computer



The computer will restart/reboot twice.

Once it’s done, login the Windows and you’ll have the full version of the Windows 2012 R2


Reference : Evaluation Versions and Upgrade Options for Windows Server 2012

keywords : upgrade evaluation to full copy, windows 2012 R2, Windows 2012 server, upgrade eval, full license, server 2012 eval, slmgr, rearm

Tuesday, July 14, 2015

DPM 2012 R2 with Azure Recovery (Backup Vault)

I would like to share my experience on how to configure DPM 2012 R2 with Azure Recovery.  Which means I’ve already had a Disk to Disk backup in place in the DPM.  I would like to extend my backup to the Azure.

Firstly the DPM 2012 R2 needs to patch with at least UR5 and the Hotfix for UR5

The Download Links are as follow :



Hotfix for UR5



The blog will cover the following :

  • Creation in Azure Recovery (Backup Vault)
  • Register DPM into Azure Recovery
  • Manage Certificate
  • Install Microsoft Azure Backup Agent (MARS)
  • Attach Vault Credential to DPM

Azure Recovery



  • Key in the Name (must be unique) and select the region
  • Click Create Vault to finish it.


  • Should have the screen something like the above.

Manage Certificate

In the DPM Server, launch the command prompt in elevated mode

C:\>makecert.exe -r -pe -n CN=ICG-AP-SCDPM01 -ss my -sr localmachine -eku -len 2048 -e 01/01/2017 ICG-AP-SCDPM01.cer

Change the values in pink and yellow only.  The rest of the syntax stays.

Pink = The DPM server that will be register into the Backup Vault
Yellow = Not more than 3 years for the validity of the certificate.


It should look something like the above in the DPM Server command prompt.

Next must upload the certificate to the Windows Azure backup vault.  Launch the Windows Azure Management Portal.


  • Click on the Recovery Services | Select the backup vault | Click on Manage Certificate



  • In the Manage Certificate, click Browse for the certificate file that was created using the command prompt of makecert.
  • Click on the Tick to confirm


  • Progress will show it has been successfully uploaded.

Install Microsoft Azure Backup Agent


  • Still in the manage Windows Azure Portal, click on the Download Agent for the DPM. Left click on it.


  • Click Save or Run (according to your preference)
  • If Save, then double-click on the file and execute it.


  • Click Next


  • Click Next if not using Proxy.
  • Then click Install .


  • Click Close once it’s completed.

Attach Vault Credential to DPM

The next step is to attach the Backup Vault for the DPM.

From Windows Manage Azure Portal | Recovery Services | the specific backup vault.


  • Click on the Download vault credentials.image


  • Save the File

Then back to the DPM Console


  • Click on the Management | then click on Register



  • Click Next.


  • Next is Backup vault  section, click Browse
  • Next in the following of the Backup Vault, click Browse
  • Select the certificate file and click Next.


  • Once it’s done, click Next.


  • Next is the Throttling Setting, input the necessary badwidth allocated, else click Next.


  • In the Recovery Folder Settings, key in or browse the Restore Folder assigned to the DPM server, then click Next.


  • In the Encryption section, click Generate passphrase (or you can key in your own)
  • Click Copy to clipboard
  • Open Notepad, then paste and save the file.
  • Then the Encryption Setting, click Register.


  • Click Close once the Register Server for Azure Backup is completed.


  • Click on Management in the left panel.
  • In the Online, verify it is registered,

Hopefully the above steps helps.

keys : System Center Data Protection, DPM, SCDPM, Azure Backup, Azure Recovery, Backup vault, Cloud backup, disk to disk to cloud.