(Reposting in the Issues area)
I am trying to import the module (ModuleVersion = '3.1.0.0') from a remote share. I would like to prevent the need to install the module on multiple workstations for security reasons.
I do not get the errors when the module is on a local drive, only when using a unc path or mapped drive.
Thank you.
PS C:\windows\system32> $PSVersionTable
Name Value
---- -----
PSVersion 3.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.18444
BuildVersion 6.2.9200.16481
PSCompatibleVersions {1.0, 2.0, 3.0}
PSRemotingProtocolVersion 2.2
When I try to import the following errors are displayed:
```
PS C:\windows\system32> Import-Module PSPKI
Update-TypeData : \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Types
\PSPKI.Types.ps1xml, \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Ty
pes\PSPKI.Types.ps1xml(5) : Error in type "System.Security.Cryptography.Oid": The member Equal is
already present.
At \\UNC_Path\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:281
char:3
+ Update-TypeData $PSScriptRoot\Types\PSPKI.Types.ps1xml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Update-TypeData], RuntimeException
+ FullyQualifiedErrorId : TypesXmlUpdateException,Microsoft.PowerShell.Commands.UpdateTypeData
Command
Update-TypeData : \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Types
\PSPKI.Types.ps1xml, \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Ty
pes\PSPKI.Types.ps1xml(24) : Error in type "System.Security.Cryptography.Oid[]": The member AddOid
is already present.
At \\UNC_Path\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:281
char:3
+ Update-TypeData $PSScriptRoot\Types\PSPKI.Types.ps1xml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Update-TypeData], RuntimeException
+ FullyQualifiedErrorId : TypesXmlUpdateException,Microsoft.PowerShell.Commands.UpdateTypeData
Command
Update-TypeData : \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Types
\PSPKI.Types.ps1xml, \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Ty
pes\PSPKI.Types.ps1xml(43) : Error in type "System.Security.Cryptography.Oid[]": The member
RemoveOid is already present.
At \\UNC_Path\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:281
char:3
+ Update-TypeData $PSScriptRoot\Types\PSPKI.Types.ps1xml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Update-TypeData], RuntimeException
+ FullyQualifiedErrorId : TypesXmlUpdateException,Microsoft.PowerShell.Commands.UpdateTypeData
Command
Update-TypeData : \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Types
\PSPKI.Types.ps1xml, \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Ty
pes\PSPKI.Types.ps1xml(63) : Error in type
"System.Security.Cryptography.X509Certificates.X509ChainStatus": The member ToString is already
present.
At \\UNC_Path\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:281
char:3
+ Update-TypeData $PSScriptRoot\Types\PSPKI.Types.ps1xml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Update-TypeData], RuntimeException
+ FullyQualifiedErrorId : TypesXmlUpdateException,Microsoft.PowerShell.Commands.UpdateTypeData
Command
Update-TypeData : \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Types
\PSPKI.Types.ps1xml, \\UNC_Path\WindowsPowerShell\Modules\PSPKI\Ty
pes\PSPKI.Types.ps1xml(74) : Error in type "System.Management.Automation.Signature": The member
SigningTime is already present.
At \\UNC_Path\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:281
char:3
+ Update-TypeData $PSScriptRoot\Types\PSPKI.Types.ps1xml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Update-TypeData], RuntimeException
+ FullyQualifiedErrorId : TypesXmlUpdateException,Microsoft.PowerShell.Commands.UpdateTypeData
Command
```
Comments: By design.