我试图在过去24小时或今天从Azure或Msol创建用户。但是我尝试的一切都不起作用;
$When = ((Get-Date).AddDays(-1))
Get-AzureADUser -Filter {(whenCreated -ge $When)} -Properties whenCreated
但这给了我这个错误;
Get-AzureADUser : Cannot evaluate parameter 'Filter' because its argument is specified as a script block and there is
no input. A script block cannot be evaluated without input.
At line:6 char:25
+ Get-AzureADUser -Filter {(whenCreated -ge $When)} -Properties whenCre ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Get-AzureADUser], ParameterBindingException
+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.Open.AzureAD16.PowerShell.GetUser