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
}

maandag 15 mei 2017

Failover Cluster Settings 2012r2 VS 2016 (Hyper-V)

Below an overview of all the differences of the available settings of a Windows failover cluster between a 2012r2 cluster and a 2016 cluster.

Hyper-v 2012 R2 Cluster settings
Hyper-V 2016 Cluster settings
Remark
AddEvictDelay                           : 60
AddEvictDelay                           : 60

AdministrativeAccessPoint               : ActiveDirectoryAndDns
AdministrativeAccessPoint               : ActiveDirectoryAndDns

BackupInProgress                        : 0
BackupInProgress                        : 0

BlockCacheSize                          : 0
BlockCacheSize                          : 0

ClusSvcHangTimeout                      : 60
ClusSvcHangTimeout                      : 135
New value
ClusSvcRegroupOpeningTimeout            : 5

Depricated
ClusSvcRegroupPruningTimeout            : 5

Depricated
ClusSvcRegroupStageTimeout              : 10
ClusSvcRegroupStageTimeout              : 10

ClusSvcRegroupTickInMilliseconds        : 300
ClusSvcRegroupTickInMilliseconds        : 300

ClusterEnforcedAntiAffinity             : 0
ClusterEnforcedAntiAffinity             : 0

ClusterGroupWaitDelay                   : 120
ClusterGroupWaitDelay                   : 120

ClusterLogLevel                         : 3
ClusterLogLevel                         : 3

ClusterLogSize                          : 300
ClusterLogSize                          : 300

CrossSubnetDelay                        : 1000
CrossSubnetDelay                        : 1000

CrossSubnetThreshold                    : 20
CrossSubnetThreshold                    : 20

CsvBalancer                             : 1
CsvBalancer                             : 1

DatabaseReadWriteMode                   : 1
DatabaseReadWriteMode                   : 0
New value
DefaultNetworkRole                      : 2
DefaultNetworkRole                      : 3
New value
Description                             :
Description                             :

Domain                                  : Name.local
Domain                                  : Name.LOCAL

DrainOnShutdown                         : 1
DrainOnShutdown                         : 1

DynamicQuorum                           : 1
DynamicQuorum                           : 1

EnableSharedVolumes                     : Enabled
EnableSharedVolumes                     : Enabled

FixQuorum                               : 0
FixQuorum                               : 0

HangRecoveryAction                      : 3
HangRecoveryAction                      : 3

Id                                      :
Id                                      :

IgnorePersistentStateOnStartup          : 0
IgnorePersistentStateOnStartup          : 0

LogResourceControls                     : 0
LogResourceControls                     : 0

LowerQuorumPriorityNodeId               : 0
LowerQuorumPriorityNodeId               : 0

MessageBufferLength                     : 50
MessageBufferLength                     : 50

MinimumNeverPreemptPriority             : 3000
MinimumNeverPreemptPriority             : 3000

MinimumPreemptorPriority                : 1
MinimumPreemptorPriority                : 1

Name                                    : CLU03
Name                                    : CLU03

NetftIPSecEnabled                       : 1
NetftIPSecEnabled                       : 1

PlumbAllCrossSubnetRoutes               : 0
PlumbAllCrossSubnetRoutes               : 0

PreventQuorum                           : 0
PreventQuorum                           : 0

QuorumArbitrationTimeMax                : 90
QuorumArbitrationTimeMax                : 90

RecentEventsResetTime                   : 10-5-2017 09:07:41
RecentEventsResetTime                   : 9-5-2017 07:42:18

RequestReplyTimeout                     : 60
RequestReplyTimeout                     : 60

RootMemoryReserved                      : 512

Depricated
RouteHistoryLength                      : 10
RouteHistoryLength                      : 10

SameSubnetDelay                         : 1000
SameSubnetDelay                         : 1000

SameSubnetThreshold                     : 10
SameSubnetThreshold                     : 10

SecurityLevel                           : 1
SecurityLevel                           : 1

SharedVolumeCompatibleFilters           : {}
SharedVolumeCompatibleFilters           : {}

SharedVolumeIncompatibleFilters         : {}
SharedVolumeIncompatibleFilters         : {}

SharedVolumeSecurityDescriptor          : {1, 0, 4, 128...}
SharedVolumeSecurityDescriptor          : {1, 0, 4, 128...}

SharedVolumesRoot                       : C:\ClusterStorage
SharedVolumesRoot                       : C:\ClusterStorage

SharedVolumeVssWriterOperationTimeout   : 1800
SharedVolumeVssWriterOperationTimeout   : 1800

ShutdownTimeoutInMinutes                : 24
ShutdownTimeoutInMinutes                : 24

UseClientAccessNetworksForSharedVolumes : 0
UseClientAccessNetworksForSharedVolumes : 2
New value
WitnessDatabaseWriteTimeout             : 300
WitnessDatabaseWriteTimeout             : 300

WitnessDynamicWeight                    : 1
WitnessDynamicWeight                    : 1

WitnessRestartInterval                  : 15
WitnessRestartInterval                  : 15


AutoAssignNodeSite                      : 0
New

AutoBalancerLevel                       : 1
New

AutoBalancerMode                        : 2
New

ClusterFunctionalLevel                  : 9
New

ClusterUpgradeVersion                   : 8
New

CrossSiteDelay                          : 1000
New

CrossSiteThreshold                      : 20
New

DumpPolicy                              : 34672921
New

GroupDependencyTimeout                  : 600
New

PlacementOptions                        : 0
New

PreferredSite                           :
New

QuarantineDuration                      : 7200
New

QuarantineThreshold                     : 3
New

ResiliencyDefaultPeriod                 : 240
New

ResiliencyLevel                         : AlwaysIsolate
New

S2DBusTypes                             : 0
New

S2DCacheBehavior                        : Default
New

S2DCacheDesiredState                    : Enabled
New

S2DCacheMetadataReserveBytes            : 34359738368
New

S2DCachePageSizeKBytes                  : 16
New

S2DEnabled                              : 0
New

S2DIOLatencyThreshold                   : 10000
New

S2DOptimizations                        : 0
New

dinsdag 17 januari 2017

VHDX files not removed after storage move

Sometimes after doing a storage move in SCVMM 2012 the source will not be removed from the CSV LUN after completion.
Not always but sometimes you will get the following message:
 
As the warning states you have to manually delete the contents, but if you delete the VHDX file it will be gone but after hitting f5 the file is still there.
There are some people saying you have to change the owner of the CSV disk and delete the files on the owner node of the CSV.
 
But there is a simpler way to delete the files. Just rename the folder where the files are located, normally is this like c:\clusterstorage\volumex\servername\
So just rename the folder servername to servernameold, then go 1 folder up to volume 1 and go back, et voila the files are gone!