Brilliant, Dave, renaming that modules directory (and I created a fresh empty one) has fixed both get-command and get-dscresource (which was where I started).
I’ve put in a Connect suggestion (ID 878376) for PowerShell Repair as it seems to me it would be good if there was a simple way to say “take me back to a clean working default installation of PowerShell (and please discard profiles, snap-ins, modules, etc)”.
Many thanks for all the help.
PS Env:> get-command
CommandType Name ModuleName
Function A:
Function B:
Function C:
Function cd…
Function cd
…
PS Env:> get-dscresource
ImplementedAs Name Module Properties
Binary File {DestinationPath, Attributes, Checksum, Con…
PowerShell Archive PSDesiredStateConfiguration {Destination, Path, Checksum, DependsOn…}
PowerShell Environment PSDesiredStateConfiguration {Name, DependsOn, Ensure, Path…}
PowerShell Group PSDesiredStateConfiguration {GroupName, Credential, DependsOn, Descript…
Binary Log PSDesiredStateConfiguration {Message, DependsOn}
PowerShell Package PSDesiredStateConfiguration {Name, Path, ProductId, Arguments…}
PowerShell Registry PSDesiredStateConfiguration {Key, ValueName, DependsOn, Ensure…}
PowerShell Script PSDesiredStateConfiguration {GetScript, SetScript, TestScript, Credenti…
PowerShell Service PSDesiredStateConfiguration {Name, BuiltInAccount, Credential, DependsO…
PowerShell User PSDesiredStateConfiguration {UserName, DependsOn, Description, Disabled…
PowerShell WindowsFeature PSDesiredStateConfiguration {Name, Credential, DependsOn, Ensure…}
PowerShell WindowsProcess PSDesiredStateConfiguration {Arguments, Path, Credential, DependsOn…}
PowerShell xADDomain xActiveDirectory {DomainAdministratorCredential, DomainName,…
…