在这里,我列举出一些比较常见和适用的Powershell命令。
1、查看最后一次登录计算机的用户,这条脚本方便管理员在服务器上运行,查看服务器除管理员外还有谁进入过。
 
超酷的Powershell_Powershell
超酷的Powershell_职场_02
 
2、查看事件日志,并筛选出为系统日志,列出错误的日志。
 
超酷的Powershell_Powershell_03
 
超酷的Powershell_职场_04
 
3、列举相应注册表下的键值
 
超酷的Powershell_Powershell_05
 
超酷的Powershell_职场_06
 
4、查找域环境中哪些服务器做了NAP的例外
 
超酷的Powershell_Powershell_07
 
超酷的Powershell_休闲_08
 
5、获取计算机相关进程列表,条件为大于或者等于相应的日期与时间
 
超酷的Powershell_Powershell_09
 
超酷的Powershell_Powershell_10
 
6、把powershell当作强大的计算器
 
超酷的Powershell_休闲_11