Tuesday, April 25, 2017

How to change the Password expiration policy in O365

 

If you want to change the maximum password age in O365 Go to Settings> Security and privacy and click on edit,

Office 365 
Admin center 
Home > Security & privacy 
policy

In next page you should be able to change the password expiration  

image

Password never expire also there and this is not a recommended. But it’s up to you to decide that.

image

Wednesday, April 12, 2017

How to download Azure VHD locally

If you want to download your Azure VM or the storage locally, then you can follow a few techniques.

One is you can use PowerShell to initiate the DB copy command or else you can use Azure Storage Explorer tool. First we will start with the PowerShell.

First go into Storage account and copy the VHD location

SVROI (unmanaged) 
R X Discard 
NAME 
SVROI 
STORAGE ACCOUNT TYPE 
Standard CRS 
* Size (Gi8) O 
ESTIMATED PERFORMANCE O 
IOPS limit 
Throughput limit (M3/s) 
OPERATING SYSTEM 
Windows 
SOURCE IMAGE 
MicrosoftWindowsServer / WindowsServer / 2016-Datacenter / latest 
* Host caching O 
Read/write 
VFD URI 
https://svrdisks655.bIob.core.windows.net/vhds/SVR0120170329155733.vhd

Login to your azure account through PowerShell. For that first you can use below mentioned command and give the credentials.

PS C:\Windows\system32> Login-AzureRmAccount

Enter password 
Ent« ttΓ¦ —d

Once you pass the correct credentials you will be able to see the below details. That means you are successfully logged in.

PS Logi n—AzureRmAccount 
Environment 
Accou nt 
Tenant Id 
Subscr i pt i onld 
Subscr i pt i onName 
CurrentStor ageAccount 
. Azur«loud 
: henal 
: Visual Studio Enterprise 
- MPN

But if you have more subscription under one account you can list down them by typing 

PS C:\Windows\system32> Get-AzureRmSubscription 

You will get the subscription details and the account state like below,

SubscriptionName : 
Visual Studio Enterprise 
Subscr i pti onld 
Tenantld 
: Enabled 
State 
- MPN

If you want to select the desired subscription, use below command 

PS C:\Windows\system32> Select-AzureRmSubscription -SubscriptionId <Subscription ID>

Next you need to shut down the VM and for that you can run below command. In my case “SVR01” is the VM.

PS C:\Windows\system32> Stop-AzureRmVM -ResourceGroupName SVR -Name SVR01PS C : Stop—AzuremnW 
Virtual machine stopping operation 
—ResourceGroupNΓ¦ne SVR 
-Name SVROI 
This cmdlet will Stop the specified virtual machine. DO you want to continue?

 

Once the server shutdown, you will see the summary as below

PS C: Stop—AzureRmVN 
Operati onld : 
. Succeeded 
Statu s 
Start Ti me 
: 06/04/2017 20:46:15 
EndTime 
: 06/04/2017 20:48:56 
Er ror 
—Resour ceGroupName SVR 
-Name SVROI

Now you can initiate the VHD Copy command by pasting the VHD URL which you have copied earlier.

PS C:\Windows\system32> Save-AzureRmVhd -ResourceGroupName SVR -SourceUri https://svrdssss655.blob.core.windows.net/vhds/SVR0120170329155733.vhd -LocalFilePath D:\AzureVHD\SVR01.vhd 

Once this completed you will be able to see your VHD in given location 

Sh View 
Datemodfied 
1 17L δΈ€

Now you can attach that into your Hyper-V console or mapped as a hard drive into your local environment.