码迷,mamicode.com
首页 > 系统相关 > 详细

Usefull Powershell script

时间:2015-02-05 07:11:48      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:usefull powershell script

How to get the AD compter OS Version, Created, patch

Get-ADComputer -searchbase ‘OU=domain controllers,DC=abc,DC=COM ‘ -filter * -Properties * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,created,@{n="lastLogonDate";e={[datetime]::FromFileTime($_.lastLogonTimestamp)}} | Export-CSV AllWindows.csv -NoTypeInformation -Encoding UTF8

Usefull Powershell script

标签:usefull powershell script

原文地址:http://linjiajun.blog.51cto.com/1303870/1611684

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!