$ForestInfo=Get-ADForest
$Domains =$forestInfo.domains
$FileName =$ForestInfo.RootDomain+”-Windows_Servers_60-9_Days_Active-“+”$(get-date -Format MM-dd-yyyy)”+”.csv”
$FilePath = “c:\temp”
$Daysactive = 60
$lastactive=(get-date).AddDays(-($Daysactive))
foreach($domain in $domains){
Write-Output “Working on $domain”
Get-ADComputer -Filter {OperatingSystem -like “*server*” -and lastlogondate -gt $lastactive -and enabled -eq $true } -Property Name,DNSHostName,OperatingSystem,OperatingSystemServicePack,IPv4Address,LastLogonDate,Modified,Description,DistinguishedName,Created -Server $domain| select Name,DNSHostName,OperatingSystem,OperatingSystemServicePack,IPv4Address,LastLogonDate,Modified,Description,DistinguishedName,Created | Export-Csv -NoTypeInformation $FilePath\$FileName -append
}
x9ls99
owlmfv
I like this web blog very much so much superb info .
wr42ip
hrc3jf
bx8vy4
9eiead
Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why throw away your intelligence on just posting videos to your site when you could be giving us something informative to read?
di826e
wxrb9l
chifax
79pz2u
sn3kre
xbse9f
hcoj6b
i194jy
s3l99g
The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.
Do you have a spam issue on this blog; I also am a blogger, and I was wondering your situation; many of us have created some nice methods and we are looking to exchange techniques with others, why not shoot me an email if interested.
Hi, Neat post. There’s a problem with your web site in internet explorer, would test this… IE still is the market leader and a big portion of people will miss your great writing due to this problem.
This website can be a stroll-by way of for the entire info you wanted about this and didn’t know who to ask. Glimpse right here, and you’ll undoubtedly uncover it.
Very interesting points you have remarked, thanks for posting.