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.

Monday, March 9, 2015

Removing Azure Subscription in PowerShell

 

imported a Azure Subscription while I was doing a test environment.  Prior to this there was an Azure Subscription that was earlier established already.

I use the following command to list it in summary

Get-AzureSubscription | ft SubscriptionName, SubscriptionID, IsDefault –AutoSize

It displayed the following :

image 

I have remove the Subscription Name of “MSDN Platforms”

Remove-AzureSubscription “Name of subscription”

* replace the subscription name in yellow. Command in green stays.

image

Key in the PowerShell command to check.  Now the Azure Subscription that I wanted is established.

Get-AzureSubscription | ft SubscriptionName, SubscriptionID, IsDefault –AutoSize

image

keynote : Azure, removing AzureSubscription, removing Azure Subscription in powershell, PowerShell,

Monday, January 19, 2015

PowerShell to Retrieve OS Image family from Azure

Azure is an ever changing.  At times I have PowerShell that provision certain image from the Azure Library, but the naming of the image keeps changing.

Once the Azure account is established to the local server PowerShell, I would use the script below to retrieve example all Windows 2012 family in Azure.

$osimage = (Get-AzureVMImage | where {$_.ImageFamily -like "Windows Server 2012 *"} | sort PublishedDate -Descending)[0].ImageName

Once that’s done, I’ll just display by key in

$osimage

End result looks like this :

image

Thank you and hopes this helps.

keynote : OS Deployment from Azure, OS Image, osimage from Azure, Azure, Windows 2012 from Azure, Image from Azure

Wednesday, December 17, 2014

How to Write into Event Viewer (using PowerShell)

I’m into a situation that I want to write the activity that was carried out into the Event Viewer (say the Application).

I’ve a PowerShell script but has incorporated the following in the beginning and the end of the script.

First I need to register the event into the server’s event viewer.  I call it as “InFront Maintenance”

In the PowerShell, I only execute once to record it down.

New-EventLog –LogName Application –Source “InFront Maintenance”

Once it’s registered, then I incorporated the following into my beginning of my script the activity that I need to carry out. 

Note : If you do not register, the next line you execute to write to event viewer, you’ll definitely hit the error.  This is because the “SOURCE” is not registered.

Write-EventLog –LogName Application –Source “InFront Maintenance” –EntryType Information –EventID 1 –Message “Maintenance Spoke A.”

So in the event viewer you’ll be able to see something like this

image

At the end of my script I indicate as follow :

Write-EventLog –LogName Application –Source “InFront Maintenance” –EntryType Information –EventID 1 –Message “End Maintenance Spoke A”

In the event viewer you’ll see like this :

image

So to summary it :

To register for the first time the event (just once)

  • New-EventLog –LogName Application –Source “InFront Maintenance”

Insert beginning on my PowerShell Script

  • Write-EventLog –LogName Application –Source “InFront Maintenance” –EntryType Information –EventID 1 –Message “Maintenance Spoke A.”

Insert at the end of my PowerShell Script

  • Write-EventLog –LogName Application –Source “InFront Maintenance” –EntryType Information –EventID 1 –Message “End Maintenance Spoke A”

Just change the Pink for your event, and the Yellow for the General Descriptions.

Thanks to the Scripting Guy Site , Ed Wilson!!

keynote : How to write to Event Viewer with powershell, using powershell to write event,event log, application log event viewer, eventviewer with PowerShell, record activity into event viewer

Friday, December 12, 2014

Drag and Drop Files into VM

I’ve a Windows 2012 R2 running Hyper-V.  A VM is running inside this Hyper-V but I need to copy some of the files into the VM.  One of the reason for not connecting to network is that the VM is cloned and I do not want to clash with the Production VM.

There’s a way that you can Drag and Drop into the VM from the Hyper-V Host into the VM.

Open the Hyper-V Settings – Click on the Enhanced Session Mode Policy.

Mark a check in the “Allow enhanced session mode” and click OK.

SNAGHTML64b88ea

Once that is done, you can drag from your Hyper-V Host into the VM desktop or any folder that you want to copy into the VM.

Thank you and hope that helps.

keyword : drag and drop files, folders into VM that is not connected to network in Hyper-V host.