- January 6, 2016 at 4:18 am #33532
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?January 6, 2016 at 11:57 am #33562
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.January 8, 2016 at 7:23 am #33662
You must be logged in to reply to this topic.