Thanks LucD
Get-ADComputer is what I am using now, I get error in powercli
The term 'Get-ADComputer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:15
+ Get-ADComputer <<<<
+ CategoryInfo : ObjectNotFound: (Get-ADComputer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
So I am using powershell for this
PS C:\> import-module activedirectory
PS C:\>
PS C:\> $domain = "xyz.com"
PS C:\> $DaysInactive = 30
PS C:\> $time = (Get-Date).Adddays(-($DaysInactive))
PS C:\> Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -Properties LastLogonTimeStamp |select-object Name,@{Name=
"Stamp"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp)}} | export-csv C:\Temp\intactive-vm.csv
PS C:\>
PS C:\>
I want to modify this to take input of as a file which has the vm names i give & give me o/p of
1. when (date & time) did this VM contacted the Active directory for my domain say, xyz..com (ie a user tried to autenticate with the Active directory domain)
2. Who was the user id
Thanks