Improve PSM1 file: use = for assignment and provide more detailed verbose output

This commit is contained in:
GraceSolutions
2025-04-14 23:20:15 -04:00
parent ccfb37aaac
commit 52a422d6cc
+2 -2
View File
@@ -7,8 +7,8 @@ $dllFiles = Get-ChildItem -Path $libPath -Filter "*.dll"
foreach ($dll in $dllFiles) { foreach ($dll in $dllFiles) {
try { try {
$dllBytes = [System.IO.File]::ReadAllBytes($dll.FullName) $dllBytes = [System.IO.File]::ReadAllBytes($dll.FullName)
[System.Reflection.Assembly]::Load($dllBytes) | Out-Null $Null = [System.Reflection.Assembly]::Load($dllBytes)
Write-Verbose "Loaded assembly: $($dll.Name)" Write-Verbose "Attempting to load assembly: $($dll.FullName)"
} }
catch { catch {
Write-Warning "Failed to load assembly $($dll.Name): $_" Write-Warning "Failed to load assembly $($dll.Name): $_"