Import-Module PKI return error

Sep 1, 2011 at 8:00 AM

When running Import-Module PKI, I am getting this error

Import-Module : The following error occurred while loading the extended type data file:
Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PKI\PKI.Types.ps1xml : File skipped because it
was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PKI\PKI.Types.ps1xml : File skipped because it
was already present from "Microsoft.PowerShell".
At line:1 char:14
+ Import-Module <<<< PKI
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

I get this error every time I try to import the module.

 

Any help?

 

Thanks in advance

Coordinator
Sep 1, 2011 at 10:16 AM

Try to load fresh PowerShell console without profile loading: powershell -noprofile

and import PKI module.

Sep 1, 2011 at 10:38 AM
Camelot wrote:

Try to load fresh PowerShell console without profile loading: powershell -noprofile

and import PKI module.

The import module works when running with noprofile.

 

Thank you very much

Coordinator
Sep 1, 2011 at 10:54 AM

Can you post your profile? Type: notepad $profile and paste here the content.

Sep 1, 2011 at 12:53 PM
Camelot wrote:

Can you post your profile? Type: notepad $profile and paste here the content.

 

It seems that i don't have a profile. $profile value is a file that does not exists.

 

Coordinator
Sep 1, 2011 at 1:05 PM

check all these profile files: http://msdn.microsoft.com/en-us/library/bb613488(VS.85).aspx

 

Sep 1, 2011 at 1:10 PM
Camelot wrote:

check all these profile files: http://msdn.microsoft.com/en-us/library/bb613488(VS.85).aspx

 

None of the files exists in system.

Coordinator
Sep 1, 2011 at 5:51 PM

can you confirm this issue on other machines?

Sep 2, 2011 at 10:05 AM
Camelot wrote:

can you confirm this issue on other machines?

Tried on another machine (Windows 7 Pro x64) and the some error.

Coordinator
Sep 2, 2011 at 11:17 AM

Currently I can't repro your error.