none
LAPS Import-Module AdmPwd.PS Fail RRS feed

  • Question

  • I'm trying to implement Microsoft's LAPS on a 2K8R2 DC. I have downloaded the documentation for installation. One step needs to import the module "AdmPwd.PS". When I try to import the module, it fails. Can someone please help me determine how to resolve this error?

    PS C:\Windows\system32> Import-Module AdmPwd.PS
    Import-Module : There were errors in loading the format data file:
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\AdmPwd.PS\AdmPwd.PS.format.ps1xml : File skipp
    ed because it was already present from "Microsoft.PowerShell".
    At line:1 char:14
    + Import-Module <<<<  AdmPwd.PS
        + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException
        + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    LAPS: https://www.microsoft.com/en-us/download/details.aspx?id=46899

    Tuesday, July 14, 2015 1:08 PM

Answers

All replies

  • It works fine for me on WS2008R2


    \_(ツ)_/

    • Proposed as answer by asfdk Friday, September 23, 2016 2:38 PM
    Tuesday, July 14, 2015 1:57 PM
    Moderator
  • It works fine for me on WS2008R2


    \_(ツ)_/

    That's it, now the problem is resolved. Thanks for the help!
    Thursday, July 16, 2015 1:14 PM
  • I ended up installing a lot of missing patches. Following that I got a different error showing "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded" . I followed a blog post to update the CLR version PowerShell uses. If you put this into a powershell file and run it, the problem should be resolved:

    <?xml version="1.0"?> 
    <configuration> 
        <startup useLegacyV2RuntimeActivationPolicy="true"> 
            <supportedRuntime version="v4.0.30319"/> 
            <supportedRuntime version="v2.0.50727"/> 
        </startup> 
    </configuration>

    https://daxbeginners.wordpress.com/2013/12/08/this-assembly-is-built-by-a-runtime-newer-than-the-currently-loaded-runtime-and-cannot-be-loaded/


    • Edited by Russel__ Thursday, July 16, 2015 1:34 PM
    Thursday, July 16, 2015 1:33 PM
  • You would have avoided all of this by just upgrading to PowerShell 4 (WMF 4.0)


    \_(ツ)_/

    Thursday, July 16, 2015 2:27 PM
    Moderator
  • Why would you install LAPS on a domain controller? 
    • Proposed as answer by weedee Tuesday, May 16, 2017 7:19 AM
    • Unproposed as answer by weedee Tuesday, May 16, 2017 7:19 AM
    Wednesday, October 5, 2016 5:54 PM
  • You would have avoided all of this by just upgrading to PowerShell 4 (WMF 4.0)


    \_(ツ)_/

    Thank you jrv. I had exactly the same issue as initial poster.

    Solution was to install WMF 4.0 like you said.

    Sadly, Microsoft documentation (LAPS_TechnicalSpecification.docx / Dependencies section) gives impression that only .NET Framework 4 is required, but WMF 4.0 is not mentioned by a word.


    • Edited by weedee Tuesday, May 16, 2017 7:22 AM
    Tuesday, May 16, 2017 7:21 AM