Monday, September 7, 2015

Users Attributes and Computer Attributes


Users Attributes

=======================================================
$ADUserProperties = @(
"Name",
"SamAccountName",
"OfficePhone",
"MobilePhone",
"Mobile",
"ipphone",
"Country",
"City",
"POBox",
"PostalCode",
"Company",
"proxyAddresses",
"telephoneNumber",
"Title",
"Department",
"Enabled",
"CanonicalName"
)

$SelectADUserProperties = @(
"Name",
"SamAccountName",
"OfficePhone",
"MobilePhone",
"Mobile",
"ipphone",
"Country",
"City",
"POBox",
"PostalCode",
"Company",
"proxyAddresses",
"telephoneNumber",
"Title",
"Department",
"Enabled",
"CanonicalName"
)

Get-ADUser -Filter * -Properties $ADUserProperties  |  select $SelectADUserProperties | Out-GridView
======================================================




Computers Inventory

===================================================
$ADUserProperties = @(
"Name",
"SamAccountName",
"Created",
"Enabled",
"LastLogonDate",
"CanonicalName",
"Title",
"LastLogon",
"Department",
"PasswordExpired"
)

$SelectADUserProperties = @(
"Name",
"SamAccountName",
"Created",
"Enabled",
"LastLogonDate",
"CanonicalName",
"Title",
"LastLogon",
"Department",
"PasswordExpired"
)

Get-ADUser -Filter * -Properties $ADUserProperties  |  select $SelectADUserProperties | Out-GridView

=======================================================