您是否想知道当您不在的时候是否有人登录过您的 PC?在前一个技能中我们解释了如何从 Windows 安全日志中解析详细的审计信息,假设您拥有管理员权限。
To find out who logged into your PC, try the code below! The function Get-LogonInfo searches for security events with ID 4624. Security information is protected, so you need to be an Administrator to run this code. This is why the code uses a #requires statement that prevents non-Admins from running the code. 要查看谁登录到了您的 PC,请试试以下代码!Get-LogonInfo 函数搜索 ID 为 4624 的安全事件。安全信息是受保护的,所以只有管理员账户才能执行这段代码。这是为什么这段代码使用 #requires 来防止非管理员执行这段代码的原因。