@jamaal said in Need help to understand host.class.php:
Hello all,
I’m banging my head to understand the host.class.php file.
I have a few posts based on Powershell to add the “location” field for a computer to be created for example.I already have the locations plug in installed and it works fine in the gui, but when I run the powershell script, location doesn’t show in Powershell, but in the gui.
I’m not trying to image yet, but I want to be able to add on a custom website; ex; Jira ticket system, the host location. It should match up in the “location” field in Powershelll.
I saw a post you can edit the host.class.php file.
I did and here’s a screen shot:
I went to create a host and it doesn’t show up, not sure what I’m doing wrong.
Here’s when I went to see if the host got created when attempting to add it via the gui. I forgot to get the words before it, but it says hosts not found.
If I can get some guidance to what I’m donig wrong, I appreciate it.
Here’s my version of FOG:
All,
This can be resolved. I finally was able to add location via Powershell! I didn’t even need to mess with the host.class file in FOG. This is thanks too @JJ-Fullmer . He had a reference to a post he had about Powershell and FOG via adding groups:
https://forums.fogproject.org/topic/12026/powershell-api-module/15?_=1648864559519
So I ended up adding another variable called $newassocias2
Again thanks to everyone that contributes to this page. I’m happy & grateful to using this product.