lwhitelock/HuduM365Automation

Users are created although disabled

Tan-DE opened this issue · 1 comments

Wrong: $CreateUsers = [bool]$env:CreateUsers
Correct: $CreateUsers = [System.Convert]::ToBoolean($env:CreateUsers)

Internal Test:
$test ="false"
$res1 = [bool]$test
$test1 << $true

The same applies to all Boolean parameters:
$CreateDevices = [bool]$env:CreateDevices
$CreateMobileDevices = [bool]$env:CreateMobileDevices
$CreateInOverview = [bool] $env:CreateInOverview
etc.

Whoops I was sure I tested that worked! Thanks for the heads up!