A new Flexera Community experience is coming on November 25th. Click here for more information.
We have some vCenter servers that the owners will not allow any firewall rules going in, so they run ESXQuery.exe and have a script that moves that to a Share on a Beacon. Would like to upload via IIS to ManagesoftRL, but when I tried this via PowerShell Invoke-RestMethod and Invoke-WebRequest commands I googled got an error I have not figured out, "No action was found on the controller 'UploadRL' that matches the request."
1) Looking though the (2017) doc we have, it does not look like ESXQuery has a parameter to do the upload itself. Instructions say to copy the NDI file.
2) Does anyone have a script they use to do this via IIS?
3) I thought of using ndupload.exe, but it does not work standalone, so would need to install the agent I think. We don't seem to install agents on our vCenter servers, and I don't know why. The server Inventory is brought in via vCenter Introspection Discovery, or in this case, ESXQuery. Is there any reason to not install an agent on a vCenter (mostly Windows) server?
‎Apr 17, 2023 01:11 PM
Found out they do have an agent on this server, so using ndupload to send all the files in the directory that ESXQuery writes to. CMD:
C:
CD C:\Program Files (x86)\ManageSoft\Uploader\
ndupload -f "C:\ManageSoft\Incoming\Inventories\*"
‎Apr 18, 2023 12:32 PM
‎Apr 17, 2023 01:27 PM
We do it that way for some others, but since this is external, I was just hoping to use the external NAT setup we have for agent uploads rather than open a firewall rule through our Web DMZ Beacon server. Using a Share with firewall rule is the fall-back plan.
Thanks
‎Apr 17, 2023 01:44 PM
I might not be following your situation. If you already "...have a script that moves that [the inventory file] to a Share on a Beacon", the script must already have the ability to write to the beacon and therefore, a FW rule must already exist. If you have a beacon server in a DMZ, there would already be rules in place that allow the beacon to talk with your application/batch server or it wouldn't function.
If the file is already being copied to any beacon, it seems to me you would need to do either of:
The normal scheduled tasks on the beacon will then pick up any new files each minute and upload them to the application/batch server. Is there something I am missing?
‎Apr 17, 2023 03:18 PM
Hi @darren_haehnel ,
Spoiler, I have a solution now that I will share, but for clarification, we have 11 Beacon servers and 39 vCenters that we read, 4 of which come in via ESXQuery. We also have no access to any servers other than our own for FNMS. So this combination of this Beacon and this vCenter did not exist.
‎Apr 18, 2023 12:08 PM
Try writing a script/command to do an HTTP PUT of the NDI content you want to upload to a URL like http://your-beacon/ManageSoftRL/Inventories/unique-filename.ndi
If that isn't working, can you post the full command you're trying here? Somebody may be able to comment further if they can see exactly how you're attempting the upload.
‎Apr 18, 2023 02:20 AM
Thanks @ChrisG , that did work! Basically I had to add "Inventories/<write file name>" to below. I found that it uploads the file name in the -uri, not the -Infile, which I don't like. Found out last night they do have an agent on this vCenter server, so successfully tested using ndupload to send all the files in the directory (can specify which Beacon, but should not need it).
This worked though:
Invoke-RestMethod -uri 'http://<beacon>/ManageSoftRL/Inventories/<write file name>' -Method Put -Infile "<input path and input file name>"
‎Apr 18, 2023 12:27 PM
... could have had the PowerShell read all of the filenames and use that, but didn't need to figure that out since the ndupload solution seemed easier.
‎Apr 18, 2023 12:34 PM
Found out they do have an agent on this server, so using ndupload to send all the files in the directory that ESXQuery writes to. CMD:
C:
CD C:\Program Files (x86)\ManageSoft\Uploader\
ndupload -f "C:\ManageSoft\Incoming\Inventories\*"
‎Apr 18, 2023 12:32 PM