something killed my directories under PackageManagement - need repair (how ?)
Something killed my Directory for all Packages.... How can i repair the Powershell-Installation withing Windows 10 ?
Already tried deactivating / activation of the feature withing windows, sfc /scannow , etc.
but i cannot use my powershell completely anymore...
$PSVersionTable
Name Value
PSVersion 5.1.15063.786
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.786
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Example of issue:
Method invocation failed because [Microsoft.PowerShell.Commands.MatchInfo] does not contain a method named 'Trimstart'.
so also basics are not even working .....
can anyone help me ?
thanks
Markus

1 comment
-
With the information provided, it appears you have lost the Modules folder under Windows\System32. The proper way to restore any component of Windows (including PowerShell) is documented here: https://support.microsoft.com/en-us/help/12415/windows-10-recovery-options
One bit of confusion I'd like to clear up: The primary version of PowerShell you are running (5.1.15063.786) is not something that can be disabled using the "Windows Feature" UI. You can only activate/de-activate the legacy version of PowerShell (version 2) in control panel.