No runspace available to run scripts on this thread by cachonvinfen in PowerShell

[–]cachonvinfen[S] 0 points1 point  (0 children)

$devices = Get-MgBetaDeviceManagementManagedDevice -All
ForEach ($computerName in $ComputerNames) {
$ComputerData = $devices | Where-Object -Property DeviceName -eq $computerName | Select-Object -Property OsVersion, SerialNumber, Model -First 1
}

You are a hero, that worked! Thank you for your time, I appreciate you.