none
Importing ConfigurationManager PS module on a machine without console installed RRS feed

  • Question

  • I am working a a DSC script resource that will perform some Configuration Manager related work. In order to do this I need access to the ConfigMgr cmdlets to the managed hosts.

    However, whenever I attempt this on a machine without the console installed, I get the error Import-Module : Could not load file or assembly 'file:///D:\DSC\ConfigManagerPSModule\AdminUI.PS.TypeAdapter.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515). This occurs whether I try to import from a connection to the install location on a site server or if I manually copy over the contents of C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin to a local folder.

    Though this is more of a PS question I guess, I am wondering if this is possible to do, or if you have to have the console installed in order to import these cmdlets.

    Friday, June 21, 2019 2:26 PM

All replies

  • Somehow in my pre-posting searching I missed this:

    https://configurationmanager.uservoice.com/forums/300492-ideas/suggestions/10177494-powershell-cmdlets-without-console

    Looks like it is not possible, and not in the cards/

    Edit, another: https://configurationmanager.uservoice.com/forums/300492-ideas/suggestions/8474842-powershell-cmdlets-on-client-machines

    I will try to get my resource working using remoting I think.

    • Edited by BryanCP Friday, June 21, 2019 2:43 PM
    • Proposed as answer by Jason SandysMVP Friday, June 21, 2019 3:55 PM
    Friday, June 21, 2019 2:42 PM
  • Have you tried just using the native WMI API?

    Alternatively, they are in the process of adding RESTful API in the latest versions that you may be able to use instead: https://www.asquaredozen.com/2019/02/12/the-system-center-configuration-manager-adminservice-guide/


    Jason | https://home.configmgrftw.com | @jasonsandys

    Friday, June 21, 2019 3:57 PM