Provisioning Services – Cache Options

How to access these options?

These cache options I have previously mentioned can be accessed via the properties of the vDisk. (To create one go to Store, right click and choose create a new vDisk)


Under access mode, if it is showing Private Image, cache type will be grayed out which is saying vDisk is currently in used and you can’t change this option. When you change the Access mode to Standard Image then you have options available;


Windows Server 2016 Editions, Pricing, Availability, Features


Windows Server 2016 is the next version of Microsoft’s server operating system. Being developed in line with Windows 10, its first technical preview came out in October 2014. The OS is still in beta stage but Microsoft has finally confirmed its final release.

Along with this news, Microsoft has also delineated how Windows Server 2016 will be serviced going forward. In earlier versions of Windows Server, it was serviced and supported with a “5+5” model meaning that there will be 5 years of mainstream support and 5 years of extended support. This continues with Windows Server 2016 as well, the only difference being the nomenclature. Customers who choose to install full Windows Server 2016 with a Desktop GUI or Server Core will maintain the same servicing experience which will be known as Long Term Servicing Branch (LTSB).

Windows Server 2016 Editions


Windows Server comes in 3 main editions:

  1. Datacenter Edition: Donning all the basic capabilities of Windows Server, this edition will provide substantial efficacy to the Organization with a requirement for unlimited virtualization coupled with robust new features.
  2. Standard Edition: Quintessential for Organization with a need for limited virtualization, this model brings forth a general purpose yet a sturdy Server Operating System.
  3. Essentials: Targeted for smaller Organization comprising no more than 50 users, this edition provides limited capabilities as per your requirement.

Windows Server 2016 MultiPoint Premium Server, Windows Storage Server 2016 and Microsoft Hyper-V Server 2016 are the other editions.

Get Last Reboot Date and Time – PowerShell

One of the most common questions asked when working with projects either for patching or testing or any other reason is when servers last rebooted. I have found the WMI class which will give us what we need.


So what can I get out of this class?

Get-WMIObject Win32_OperatingSystem | Get-Member

Get-CimInstance Win32_OperatingSystem | Get-Member

There is a difference we will see. Look at the definitions. This will reflect to their output.



and LastBootUpTime what we need and we need to pull this info out of here;

Get-WMIObject -ClassName win32_OperatingSystem | select csname, lastbootuptime

csname                 lastbootuptime
——                  ————–
USER-PC             20160707090526.982130+060


Get-CimInstance -ClassName win32_OperatingSystem | select csname, lastbootuptime

csname                  lastbootuptime
——                   ————–
USER-PC               7/7/2016 9:05:26 AM

So looks like we need to convert the time if you use Get-WMIObject

>$wmi = gwmi win32_operatingsystem


$LastBootUpTime = Gwmi Win32_OperatingSystem -Comp server01 | Select -Exp LastBootUpTime

>gwmi win32_operatingsystem | %{ $_.ConvertToDateTime($_.LastBootUpTime) }


>$BootTime = Invoke-Command -Cn server01, server02`
  -Command { (gwmi win32_operatingsystem).lastbootuptime }
>$BootTime | foreach { ([wmi]'').ConvertToDateTime($_) }

Why do you need to go through these conversions, just use Get-CimInstance...

>$BootTimes = Get-CimInstance -Cn server1, server2-Class Win32_OperatingSystem |
    Select PSComputerName, LastBootUpTime

>$BootTimes | Format-Table -AutoSize

PSComputerName LastBootUpTime       
-------------- --------------       
server1        8/18/2016 15:40:32 PM 
server2        8/19/2016 20:50:53 PM
 If you have got a few servers put them in a txt file  (serverlist.txt) and use;

$compname = Get-Content -Path C:\serverlist.txt
foreach ($comp in $compname) {
    Get-WmiObject win32_operatingsystem -ComputerName $comp | '
select CSName, @{LABEL='LastBootUpTime';'



Blob copy between Storage Accounts in Azure

Previously I copied a vhd file called Nano2016.vhd from my on-premises server in to Azure. Now I need to use this file for my other storage account. So it means I need to copy this file in to my other storage account.

StorageAccount01  —————–> StorageAccount02

vhds container        —————–> uploads container (will be created during copy)

The script I am going to run is;

$vhdName = “Nano2016.vhd”
$srcContainer = “vhds”
$destContainer = “uploads”
$srcStorageAccount = “Storageaccount01”
$destStorageAccount = “StorageAccount02”

$srcStorageKey = (Get-AzureStorageKey -StorageAccountName` $srcStorageAccount).Primary
$destStorageKey = (Get-AzureStorageKey -StorageAccountName` $destStorageAccount).Primary
$srcContext = New-AzureStorageContext –StorageAccountName` $srcStorageAccount `
-StorageAccountKey $srcStorageKey

$destContext = New-AzureStorageContext –StorageAccountName ` $destStorageAccount `
-StorageAccountKey $destStorageKey

New-AzureStorageContainer -Name $destContainer `
-Context $destContext
$copiedBlob = Start-AzureStorageBlobCopy -SrcBlob $vhdName `
-SrcContainer $srcContainer `
-Context $srcContext `
-DestContainer $destContainer `
-DestBlob $vhdName `
-DestContext $destContext

$copiedBlob | Get-AzureStorageBlobCopyState

As you see we need to gather some info to such as our file name, source container which our file hosted “vhds”, destination container which in my case it will be “uploads” and will be created during running this script and of course our storage accounts. you can use both Azure portal or powershell for these.

Get-AzureStorageAccount | Format-Table -Property Label

From Azure Portal

Storage> you can get all the storage accounts and click on your source storage account and then containers to choose your container and the file.


and also get your storage account names so that we can use them for our script.

$vhdName = “Nano2016.vhd”
$srcContainer = “vhds”
$destContainer = “uploads”
$srcStorageAccount = “Storageaccount01”
$destStorageAccount = “StorageAccount02”

After that we can run our script. I will run one line at a time to see the steps clearly..

PS C:\Users\user> $vhdName = “Nano2016.vhd”
$srcContainer = “”
$destContainer = “”
$srcStorageAccount = “storageaccount01”
$destStorageAccount = “storageaccount02”


PS C:\Users\user> $srcStorageKey = (Get-AzureStorageKey -StorageAccountName $srcStorageAccount).Primary
PS C:\Users\user> $destStorageKey = (Get-AzureStorageKey -StorageAccountName $destStorageAccount).Primary
PS C:\Users\user> $srcContext = New-AzureStorageContext –StorageAccountName $srcStorageAccount `
-StorageAccountKey $srcStorageKey
PS C:\Users\user> $destContext = New-AzureStorageContext –StorageAccountName $destStorageAccount `
-StorageAccountKey $destStorageKey

Next to create a new container in destination storage account;

PS C:\Users\user> New-AzureStorageContainer -Name $destContainer `
-Context $destContext

Blob End Point:

Name                     PublicAccess                          LastModified
—-                        ————                      ————
uploads                  Off                                               2/25/2016 12:06:05 PM +00:00

Finally starting copy task;

PS C:\Users\user> $copiedBlob = Start-AzureStorageBlobCopy -SrcBlob $vhdName `
-SrcContainer $srcContainer `
-Context $srcContext `
-DestContainer $destContainer `
-DestBlob $vhdName `
-DestContext $destContext

PS C:\Users\user>

As you see you don’t get any information about copying process…

So we need to run another cmdlet;

PS C:\Users\user> $copiedBlob | Get-AzureStorageBlobCopyState
CopyId : 6557ef45-b677-4bbe-92b5-b9888676acf6
CompletionTime :
Status : Pending   <————
Source :
BytesCopied : 0
TotalBytes : 107374182912
StatusDescription :

Or just go to Azure Portal > Storage > Destination Storage Account > Container

in my case I can see a new contaier “uploads” been created and my file is there.


And again if you run;

PS C:\Users\user> $copiedBlob | Get-AzureStorageBlobCopyState

CopyId : 6557ef45-b677-4bbe-92b5-b9888676acf6
CompletionTime : 2/25/2016 12:08:46 PM +00:00
Status : Success  <—————-
Source :
BytesCopied : 107374182912
TotalBytes : 107374182912
StatusDescription :

As you see the status has changed to Success from Pending…

Let’s review the parameters in the preceding example:
■■ The SrcBlob parameter expects the file name of source file to start copying.
■■ The SrcContainer parameter is the container the source file resides in.
■■ The Context parameter accepts a context object created by the New-AzureStorageContext cmdlet. The context has the storage account name and key for the source storage account and is used for authentication.
■■ The DestContainer is the destination container to copy the blob to. The call will fail if
this container does not exist on the destination storage account.
■■ The DestBlob parameter is the filename of the blob on the destination storage account.
The destination blob name does not have to be the same as the source.
■■ The DestContext parameter also accepts a context object created with the details of
the destination storage account including the authentication key.

P:S. To copy between storage accounts in separate subscriptions, you need to call Select-AzureSubscription between the calls to Get-AzureStorageKey to switch to the alternate subscription.