Summary: Use Windows PowerShell to find screensaver information for a user who is currently logged-on.
How can I use Windows PowerShell to find screensaver information for a currently logged-on user?
Use WMI, query the Win32_Desktop class, and select the currently logged-on user.
- In Windows PowerShell 3.0:
Get-CimInstance win32_desktop | where name -eq (whoami)
- In Windows PowerShell 2.0:
Get-WmiObject win32_desktop | where { $_.name -eq (whoami) }