lwhitelock / HuduM365Automation

Hudu Microsoft 365 Syncronisation Tool
GNU Affero General Public License v3.0
29 stars 72 forks source link

Users are created although disabled #3

Closed Tan-DE closed 2 years ago

Tan-DE commented 2 years ago
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.

lwhitelock commented 2 years ago

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