Skip to content

Instantly share code, notes, and snippets.

View juliantsu's full-sized avatar

Julian juliantsu

View GitHub Profile
Get-PnpDevice -PresentOnly |
Where-Object { $_.InstanceId -like 'PCI*' } |
Select-Object InstanceId, FriendlyName, Class, Manufacturer
$exePath = Read-Host "Provide path for EXE-File"
if (-Not (Test-Path $exePath)) {
Write-Error "File not found."
exit
}
$randomGUID = [guid]::NewGuid().ToString("B").ToUpper()
$tempPath = [System.IO.Path]::GetTempPath()
$destinationFolder = Join-Path $tempPath $randomGUID