Skip to content

If both devices have the same name, this script won't work as well #1

@devRolige

Description

@devRolige

It works great - I added it to Task Scheduler, but I had to change
$frontCamera = Get-PnpDevice -Class Camera -Status OK | Where-Object { $_.FriendlyName -match "Front|Integrated" -and $_.FriendlyName -notmatch "Hello|IR|Infrared" } return $frontCamera
to
$frontCamera = Get-PnpDevice -Class Camera -Status OK | Where-Object { $_.DeviceId -eq "USB\VID_0C45&PID_6728&MI_00\6&230D12BB&0&0000" } return $frontCamera
for my Dell. ChatGPT helped me with it.
Anyway, selecting a device by "FriendlyName" is misleading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions