asked on
$Results | Export-Csv -Path C:\test\PCLogon.CSV -NoTypeInformation
ASKER
Get-ADComputer -Filter "operatingSystem -like '*Server*'" -ResultSetSize $null
ASKER
Get-ADComputer -Filter "operatingSystem -like '*Server*'" -ResultSetSize $null -Properties location, lastLogonTimeStamp |
Select-Object -Property Name, Location, @{n='LastLogon'; e={[DateTime]::FromFileTime($_.lastLogonTimeStamp)}}, DistinguishedName |
Export-Csv -Path C:\test\PCLogon.CSV -NoTypeInformation
ASKER
Get-ADComputer -Filter "operatingSystem -notlike '*Server*'" -ResultSetSize $null -Properties location, lastLogonTimeStamp |
Select-Object -Property Name, Location, @{n='LastLogon'; e={[DateTime]::FromFileTime($_.lastLogonTimeStamp)}}, DistinguishedName |
Export-Csv -Path C:\test\PCLogon.CSV -NoTypeInformation
ASKER
# Full set of AD Management Tools:
Install-WindowsFeature -Name RSAT-AD-Tools
# PowerShell AD Management Tools only:
Install-WindowsFeature -Name RSAT-AD-PowerShell
On Windows 10, runAdd-WindowsCapability -Online -Name 'Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0'
Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.
TRUSTED BY
ASKER