dinsdag 21 november 2017

Add Fibre channel Adapter Hyper-v 2016

When you want to add an Virtual Fibre adapter to an VM you will get an error like


When this happens you have to set the VirtualizationBasedSecurityOptOut  to $true:
Set-VMSecurity -vmname "vmname" -VirtualizationBasedSecurityOptOut $true


After changing this you will be able to add an virtual fibre channel adapter







woensdag 1 november 2017

Users in Azure groups

Below command makes connection to you Azure environment and looks which users are in the Azure predefined groups

# Connect to MSOL
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential


# Get all users from azure groups
$roles = Get-MsolRole

foreach ($role in $roles)
{
    write-host $role.Name -ForegroundColor Green
    Get-MsolRoleMember -RoleObjectId $role.ObjectId
}