We hope to deliver this capability in the future and will share additional information here as soon as possible.
This report is a bit confusing, so need some information.
On the system where you received this error, please try running any of the commands from Microsoft.PowerShell.Utility, such as get-member, or get-date. The error message and the information you provided seems to indicate that the module is already loaded, so we are looking for other indications that it is not.Ori Besser commented
get-date - works as expected
get-filehash - "The term 'get-filehash ' is not recognized as the name of a cmdlet, function..."
Based on your suggestion to run Get-Date (which worked as expected) I further investigated the issue and I can narrow it down to that:
Exporting any of the cmdlets (like get-date, import-csv..) from 'Microsoft.PowerShell.Utility' module works as expected.
Exporting any of this module functions (like get-filehash, New-Guid..) results in those functions not being imported at all.
(I am "exporting" because it is a 'RestrictedRemoteServer' session type which has almost no commands by default)
In addition, when connecting to this session configuration (enter-pssession), I get the following message if I export any 'Microsoft.PowerShell.Utility' function:
WARNING: The 'Microsoft.PowerShell.Utility' module was not imported because the 'Microsoft.PowerShell.Utility' snap-in was already imported.
Again, if I export only cmdlets from 'Microsoft.PowerShell.Utility' I do not get this message.Ori Besser shared this idea ·