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:

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

    Edit, another:

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

    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:

    Jason | | @jasonsandys

    Friday, June 21, 2019 3:57 PM