PowerTip: Use PowerShell to Discover Laptop Webcam

PowerTip: Use PowerShell to Discover Laptop Webcam

  • Comments 9
  • Likes

Summary: Use Windows PowerShell to discover a webcam attached to your laptop.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find a webcam or camera that is attached to my laptop?

Hey, Scripting Guy! Answer Use the Get-CimInstance or the Get-WmiObject cmdlet, examine the Win32_PnpEntity WMI class,
          and look for something that matches camera in the caption.

By using Get-CimInstance in Windows PowerShell 3.0 or later:

Get-CimInstance Win32_PnPEntity | where caption -match 'camera'

By using Get-WmiObject in Windows PowerShell 2.0:

Get-WmiObject Win32_PnPEntity | where {$_.caption -match 'camera'}

Note  Not all webcams populate exactly the same way, so it may take a bit of searching
to find the right string.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • thanks

  • Pretty good posting here,I never thought about that I will catch any information

    www.visec.net/index.php www.freesimusa.com Prepaid Sim Cards,Unlimited Mobile Calls,International Sim Card,International Free Calls,Data Sim Card Usa,Global Sim