Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
27 days ago

Has anyone use the Powershell Module to create websites?

Hi,

We have two LM portals and want to combine them.  I was able to use Powershell and the API to export the resources from the old portal and get them imported into the new one.  It worked really well.  I now need to do the same thing with the websites.

https://logicmonitor.github.io/lm-powershell-module-docs/documentation/websites/new-lmwebsite/

I can do the export just fine, but am having issues creating them when it comes to the collector IDs for Internet websites.

The documentation and examples show using the -TestLocationCollectorIds property but I can't get it to work.

 

I only have one collector per check for internal sites  which happens to be #26.  I tried using -TestLocationCollectorIds @(26) and -TestLocationCollectorIds 26.  Both do the import, but show dead-collector:

 

If I open up the site, I can manually add collector 26 without any problems.  I just can't get it to work with the PowerShell module.

Anyone have any ideas?

1 Reply

  • Nevermind.  I found an answer was posted last week on Github.

    For anyone else using this:

    https://github.com/logicmonitor/lm-powershell-module/discussions/54