As easy as this may sound, I am having some problems with it.
The output is useless like this, when I export it to csv the tsallowlogon field is just blank.
I imaging there is some way I can do the same with "get-qaduser | select tsallowlogon" as I have done with "get-qaduser $_.LegacyDN.DN", but I cannot figure out how.
Any ideas?
Code:
Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer koks-u549ckztx1 | Where {($_.MailboxDisplayName -notmatch "System") -and ($_.MailboxDisplayName -notmatch "SMTP")} | select @{Name="Username";expression={$_.MailboxDisplayName}}, @{name="MailboxSize";expression={$_.Size}}, @{name="TS-Adgang";expression={Get-QADUser | select TSAllowLogon}},@{name="DN";expression={(Get-QADUser $_.LegacyDN).DN}}, @{name="Dato";expression={$date}}
I imaging there is some way I can do the same with "get-qaduser | select tsallowlogon" as I have done with "get-qaduser $_.LegacyDN.DN", but I cannot figure out how.
Any ideas?