May 14th, 2013

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

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to show screensaver info for a user who is logged on.

Hey, Scripting Guy! Question How can I easily use Windows PowerShell to show screensaver information for the currently logged-on interactive user?

Hey, Scripting Guy! Answer Use WMI to query the Win32_Desktop class, and filter on the logged-on user’s name:

Get-Wmiobject win32_desktop | where name -match $env:USERNAME

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.