Hello All,
I am trying to work on the Script to get the manager disabled for a specific set of accounts and i am using the following conditions to get the disabled manager information.
Get-ADUser -Filter {(sAMAccountName -like "xx" -or sAMAccountName -like "yy")} -properties Manager|
Select Name,@{label="Manager Status";expression={(Get-ADUser $_.Manager -Properties SAMAccountName).SamAccountName}} |
Where-Object {($_.Manager).Enabled -eq $false} |Export-CSV C:\temp\managerdisable.csv
When i try to run this script i am getting a blank CSV file.