mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Expose all cmdlets from PSDiagnostics if logman.exe is available (#8366)
This commit is contained in:
@@ -437,12 +437,12 @@ namespace Microsoft.PowerShell.Diagnostics
|
||||
}
|
||||
"@
|
||||
|
||||
if ($psedition -eq 'Core')
|
||||
{
|
||||
# Currently we only support these cmdlets as logman.exe is not working on Nano/Lot system.
|
||||
Export-ModuleMember Enable-PSTrace, Disable-PSTrace, Get-LogProperties, Set-LogProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
Export-ModuleMember Start-Trace, Stop-Trace, Enable-WSManTrace, Disable-WSManTrace, Enable-PSTrace, Disable-PSTrace, Enable-PSWSManCombinedTrace, Disable-PSWSManCombinedTrace, Get-LogProperties, Set-LogProperties
|
||||
}
|
||||
if (Get-Command logman.exe -Type Application -ErrorAction SilentlyContinue)
|
||||
{
|
||||
Export-ModuleMember Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace, Enable-PSWSManCombinedTrace, Enable-WSManTrace, Get-LogProperties, Set-LogProperties, Start-Trace, Stop-Trace
|
||||
}
|
||||
else
|
||||
{
|
||||
# Currently we only support these cmdlets as logman.exe is not available on systems like Nano and IoT
|
||||
Export-ModuleMember Disable-PSTrace, Enable-PSTrace, Get-LogProperties, Set-LogProperties
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user