If I try to run the following lines of code I get the following exception:
Error
Get-TroubleshootingPack : Es wurde kein Positionsparameter gefunden, der das Argument "Invoke-TroubleshootingPack" akzeptiert.
In Zeile:4 Zeichen:16
+ $PrinterPack = Get-TroubleshootingPack @TroubleshootingPack Invoke-Troubleshooti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-TroubleshootingPack], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Windows.Diagnosis.Commands.GetTroubleshootingPack
Code
$TroubleshootingPack = @{
Path = "$env:windir\diagnostics\system\printer"
}
$PrinterPack = Get-TroubleshootingPack @TroubleshootingPack Invoke-TroubleshootingPack -Pack $PrinterPack
I do not understand the problem because my code looks for me like an modification of the code from the help:
get-troubleshootingpack -path C:\Windows\Diagnostics\System\Aero | invoke-troubleshootingpack