Skip to content

Commit

Permalink
Update Trace-SM.ps1 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
khusmeno-MS authored Nov 9, 2023
1 parent e5ff449 commit 0d1d582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Trace-SM/Trace-SM.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function main() {
}
#endregion

$SmInstallFolder = [System.IO.Path]::Combine( (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\System Center\2010\Service Manager\Setup').InstallDirectory, "Tools" )
$SmInstallFolder = [System.IO.Path]::Combine( (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\System Center\2010\Service Manager\Setup' -ErrorAction SilentlyContinue).InstallDirectory, "Tools" )
if ( -not (Test-Path -LiteralPath $SmInstallFolder) ) {
Write-Host "No SCSM installation folder detected. Aborting." -ForegroundColor DarkGray
return
Expand Down

0 comments on commit 0d1d582

Please sign in to comment.