User Profile
TysonPaul
Joined 7 years ago
User Widgets
Recent Discussions
Re: PL2303 issues (Prolific USB to Serial Drivers) Win 11
chrullrich Excellent advice. I turned your instructions into a PowerShell snippet with makes this procedure pretty quick. Just set the path to the driver files. Attached is a screenshot of my Device Manager with 2 programming cables plugged in. (1 Yaesu, 1 Baofeng). # Set the current location to the specified directory Set-Location 'C:\ProlificDrivers\PL2303D_DCHU_Win11_21H2_v3.9.0.2_20210728_ML_Driver' # Create a log file with the current date in the filename $outfile = "install_$(Get-Date -Format yyyyMMdd).log" # Install the driver using pnputil.exe and save the output to the log file $InstallResult = pnputil.exe /add-driver *.inf /subdirs /install $InstallResult | Out-File $outfile -Append -Encoding utf8 -Force # Extract the OEM name from the install result [string]$Published = $InstallResult -match 'publish' $OEMIndex = $Published.IndexOf('oem') [string]$OEMName = $Published.Substring($OEMIndex, ($Published.Length - ($OEMIndex)) ) # Get a list of other installed drivers $otherDrivers = pnputil.exe /enum-drivers # Create an array to store the names of drivers that need to be deleted [System.Collections.ArrayList]$badDrivers = @() # Iterate through each line of the otherDrivers output ForEach ($Line in $otherDrivers) { if ($Line -match "Published Name") { $PublishedName = @($Line -split 'Published Name: ')[1] } # Check if the line contains "prolific" and the PublishedName is not the same as the OEMName if ($Line -match "prolific" -AND ($PublishedName -ne $OEMName)) { $badDrivers.Add($PublishedName) } } # Create a message with the names of the drivers to be deleted $Msg = @" Driver to delete: $($badDrivers | Out-String ) "@ # Append the message to the log file and display it in the console with green color $Msg | Out-File $outfile -Append -Encoding utf8 -Force Write-Host $Msg -ForegroundColor Green # Attempt to delete the bad drivers try { ForEach ($Name in $badDrivers) { $attempt = pnputil /delete-driver $Name # If the deletion attempt fails, throw an exception If ($attempt -match 'failed') { throw $attempt } # If the deletion is successful, update the message and append it to the log file $Msg = "Driver deleted successfully." $Msg | Out-File $outfile -Append -Encoding utf8 -Force Write-Host $Msg -ForegroundColor Green } } catch { # If an exception is caught, update the message with the error and append it to the log file $Msg = "Failed to delete driver. Please delete manually.`nError: $_" $Msg | Out-File $outfile -Append -Encoding utf8 -Force Write-Host $Msg -ForegroundColor Yellow }82KViews0likes0CommentsRe: SCOM - Enable "Database Backup Status" monitor for select databases
The process is as follows (assuming you are using the Console to create the group): Create a custom group; give it an appropriate name that ends with "Group". Example: "Spinco Production Databases Group". Define the custom group to dynamically include either the workflow target type: MSSQL on Windows: Database (Microsoft.SQLServer.Windows.Database) or a child class of the target type or the class type that hosts the target type; in this case the hosting class is: MSSQL on Windows: DB Engine (Microsoft.SQLServer.Windows.DBEngine). You can use any properties of the class types mentioned above to define your dynamic membership rule. Class graphs available here. Override the monitor for a group; specify your new group as the target. In which unsealed MP this group definition should be stored is a topic all on its own and is beyond the scope of this response but just keep in mind that the override must be stored in the same unsealed MP as the group. The best approach for overrides in general (according to this guy) can be found here: https://monitoringguys.com/2016/05/24/how-to-correctly-create-an-override-for-a-scom-workflow/. But unfortunately the guidance at the link doesn't go into detail about groups because it's a bit more complicated to explain.597Views0likes1Comment