SmbShare module has no default localisation data file

I am attempting to use invoke-command to run a script on a remote computer. The UICulture of my local machine is en-GB. During the executing of my remote script, it does an “Import-Module SmbShare”. This fails with the following error:

Cannot find the Windows PowerShell data file ‘SmbLocalization.psd1’ in directory ‘C:\Windows\system32\WindowsPowerShell\v1.0\Modules\SmbShare\en-GB’, or in any parent culture directories.

Looking at the modules folder, I can see that the SmbShare folder does not contain an en-GB folder. However, there is also no SmbLocalization.psd1 file directly under the SmbShare directory (as I would have expected). The only localization data file I can find is under …\SmbShare\en-US\SmbLocalization.psd1. This means the command will fail when the UI Culture is set to anything other than en-US.

For now, I have implemented a workaround by including a step in my script to copy the SmbLocalization.psd1 file to the SmbShare directory. It can then import the SmbShare module without errors.

Please can someone confirm whether this is a bug in the SmbShare module (that I should report on Connect) or whether I am mistaken in my assumptions about how this stuff works?

They’re taking bugs on UserVoice now, not Connect, but I’d classify this as a bug, yes. If it’s consistent and you can repeat it on different machines, report it. I think the UserVoice change was recently announced on the PowerShell team blog.

Thanks Don

Bug posted at http://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11351979-smbshare-module-localization-does-not-work-when-ui