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

image

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

image

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

image

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 :

image

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

image

  • 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.

image

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
image
  • Select the Report Manager URL on the left panel
  • Click on the URL on the right panel

image

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

image

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

image

  • 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

image

  • Click OK once it’s successful

image

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

image

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

image

  • 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.

image

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.

image

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.

image

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.

image

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

image

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

image

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

image

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.

SNAGHTML2f84ac

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

image

Press Y to restart the computer

image

image

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

image

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 :

UR5

http://catalog.update.microsoft.com/v7/site/search.aspx?q=3021791

Hotfix for UR5

http://www.microsoft.com/en-in/download/details.aspx?id=45914

 

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

image

 

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

image

  • 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 1.3.6.1.5.5.7.3.2 -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.

image

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.

image

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

 

image

  • 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

image

  • Progress will show it has been successfully uploaded.

Install Microsoft Azure Backup Agent

image

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

image

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

image

  • Click Next

image

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

image

  • 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.

image

  • Click on the Download vault credentials.image

 

  • Save the File

Then back to the DPM Console

image

  • Click on the Management | then click on Register

 

image

  • Click Next.

image

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

image

  • Once it’s done, click Next.

image

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

image

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

image

  • 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.

image

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

image

  • 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.