PowerTip: Use PowerShell to Find Screensaver Info for Logged-on User

Doctor Scripto

Summary: Use Windows PowerShell to find screensaver information for a user who is currently logged-on.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find screensaver information for a currently logged-on user?

Hey, Scripting Guy! Answer 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) } 

0 comments

Discussion is closed.

Feedback usabilla icon