lwhitelock / HuduM365Automation

Hudu Microsoft 365 Syncronisation Tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Users are created although disabled

Tan-DE opened this issue · comments

commented
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!