随笔分类 -  PowerShell

摘要:第一步,判断Windows Time服务是否正在运行,如果没有,则开启它。第二步,强制同步,不知为何,往往第一次会失败,那么就多运行几次好了。 Get-Service w32time | Where {$_.status –eq 'Stopped'} | Start-Service W32tm /r 阅读全文
posted @ 2020-09-25 08:31 会飞的老虎 阅读(923) 评论(0) 推荐(0)
摘要:$File = "\\10.10.10.1\test\Password.txt"[Byte[]] $key = (1..16)$Password = "123456" | ConvertTo-SecureString -AsPlainText -Force$Password | ConvertFro 阅读全文
posted @ 2020-09-24 11:29 会飞的老虎 阅读(282) 评论(0) 推荐(0)
摘要:get-service -computerName 计算机名或者IP 需要有远程计算机权限 阅读全文
posted @ 2020-09-23 17:14 会飞的老虎 阅读(175) 评论(0) 推荐(0)