I want to get the instanceID of a device just as a string and assign it to a variable
I only know the device name, so when I do:
Get-PnpDevice -FriendlyName 'TSP100'
It displays:
Status Class FriendlyName InstanceId
------ ----- ------------ ------------
OK PrintQueue TSP100 SWD\PRIN...
so ideally it would look something like this:
$env:tsp100id = (Get-PnpDevice -FriendlyName 'TSP100' *some stuff*)