Including PowerShell module "ActiveDirectory" in boot image


  • I have need to use some cmdlets found in the PS ActiveDirectory module during my deployment task sequence. I have tried a couple variations of including the module, by mounting the boot.wim and manually copying all the files/folders over. I also tried using another users PS script that does the same thing.

    Both attempts failed to produce the results I needed. When booted up with the modified boot.wim, I get an error trying to use "Get-ADOrganizationalUnit" saying no such command, cmdlet, etc was found. If I try to Import-Module activedirectory, it gives an error saying it's unable to locate a server running ADWS. Our network admin does not want to spin up ADWS (unsure of reasons), so is there anyone out there that has accomplished this? Could you please share!

    Thanks in advance!


    Thursday, April 26, 2018 2:37 PM


  • I eventually got this to work just by adding 

    import-module ActiveDirectory | Out-Null

    and specifying the -server along with credentials


    • Marked as answer by JWallin Thursday, November 15, 2018 8:59 PM
    Thursday, November 15, 2018 8:59 PM

All replies