• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Jamaal
    3. Best
    J
    • Profile
    • Following 1
    • Followers 0
    • Topics 13
    • Posts 78
    • Best 8
    • Controversial 0
    • Groups 0

    Best posts made by Jamaal

    • RE: Need help to understand host.class.php

      @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.

      host.PNG

      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:
      host php.PNG

      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.
      attempt 2.PNG

      If I can get some guidance to what I’m donig wrong, I appreciate it.

      Here’s my version of FOG:
      version.PNG

      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

      resolution.PNG

      Again thanks to everyone that contributes to this page. I’m happy & grateful to using this product.

      posted in FOG Problems
      J
      Jamaal
    • RE: fog API powershell help

      Ok, I think I got this figured out just now.
      Thanks to you jj, I followed your example from your original link:

      https://forums.fogproject.org/topic/12026/powershell-api-module/11

      So far I got this to work on one host: Here’s what I did by using your script:

      $newAssocs = New-Object System.Collections.Generic.List[object];
      $computer = (get-foghost -hostname “itloaner”).id
      $groups = (get-fogobject -type object -coreobject group).groups | where-object name -eq “sales”
      $groupAssocs = Get-FogObject -Type Object -CoreObject groupassociation

      $json = @{
      “hostID”=$computer;
      “groupID”=“$($groups.id)”;
      } | ConvertTo-Json;
      # Note, when creating the json splat and then piping it to convertto-json you must encapsulate properties and values in quotes and match the case of the original property (i.e. ID instead of Id) as in this example or it won’t parse right and will return a 417 error from the api

      $result = New-FogObject -type object -coreObject groupassociation -jsonData $json;
      $NewAssocs.Add($result);

      #list the newassocs that added the laptops to your group
      $NewAssocs;

      It then showed up as it added as per the results attached in this message.test1.PNG

      For further proof, I went to my test host and verified it was added via the new-fogobject command. I’m starting to understand now how this works. I just need to keep playing around with it and should be good going forward.

      My next task is to try to create a task via powershell to get the inventory of the machine before deploying the image. If you know of any commands, please let me know and I’ll keep trying myself as well.

      Again thanks for the info.

      posted in General
      J
      Jamaal
    • RE: Help with Win10 Driver injection

      @george1421 hey George, so I see what the problem was with WSUS. I thought the content folder can be put anywhere since it said remote path. I tried my NAS both network path and iscsi, but still locks up the downloads. I did research and said it’s not supported in a network share, so I put it back on the local.

      Now for the Office 2013 updates, I found this online to extract the service pack 1 and I was able to get the updates faster compared to WSUS.

      https://www.howto-outlook.com/howto/slipstreamoffice2013sp.htm

      I’m working on the unattend file and will work on copying files this weekend. The offline script I was following sucked and didn’t work no matter what I tried. I’ll keep you posted. Thanks for leading me in the right direction.

      posted in General Problems
      J
      Jamaal
    • RE: unable to install CA certificate (MDT 2013)

      @Sebastian-Roth said in unable to install CA certificate (MDT 2013):

      @Jamaal said in unable to install CA certificate (MDT 2013):

      I changed from the quiet switch to passive and I noticed the CA certificate error.

      Please give us more information about this. Exact error message? Possible take a screenshot and port here.

      Please close this ticket! It was my mistake. The issue was that I found a powershell script to disable the internet access during the MDT process, but the program was since fog tried to reach the ip address of the fog server, it was being blocked due to non internet access. I moved the script further down the process and it installed. Thanks for all of your input though.

      posted in FOG Problems
      J
      Jamaal
    • RE: Powershell API Module

      @jj-fullmer

      Hello, jj,

      Thanks for the fog api notes, appreciate you helping us out. I’m not sure if you remembered me, but have a few questions.

      I’m trying to do 2 things. One to assign a group to a machine one created in fog via powershell. I tried get-foggroupbyname, but says the parameter is not recognized.parameter not recognized.PNG

      It then told me to go to c:\program files… until I got to fogapi.psm1

      I copied and pasted the command for cmdletBinding.

      It didn’t error out, but didn’t return anything. Ex; , I know I created a Sales group in the Fog Gui with snapins assigned to it, so I wanted the machine to be assigned to that group to make it more dynamic. Please see attached pics. I’ll keep trying as well on my side. I’m so so on Powershell, but came a long way.parameter 2.PNG

      posted in Tutorials
      J
      Jamaal
    • RE: fog API powershell help

      @jj-fullmer said in fog API powershell help:

      $snapinsToRemove = @(‘snapin’,‘names’,‘here’);

      That’s what I needed, an array to choose from a list. Thank you so much! Really appreciate you on helping me on this.

      posted in General
      J
      Jamaal
    • RE: FOG 1.5.4 API host module settings

      @Sebastian-Roth said in FOG 1.5.4 API host module settings:

      Pinging @JJ-Fullmer on this. 🙂

      All,

      I figured this out! I got hostname changer via PowerShell. So here’s what I did to resolve it.
      So with the script I got from this forum last week, I know it had the Json in a splat format. I’m so so with PowerShell
      and doing a lot better than a few years back. So basically what KaterKarlo said, he has moduleid = 9.

      It wasn’t working for me. To get the correct name and ID number, I ended up going to my fog server via the browser, then right click on the browser and view page source did a search for hostname changer. Then it came up the name modules and the value of 9. I finally ended up putting it with the rest of the splat and joined it with no issues:

      “modules” = 9

      I hope this helps someone as well if they need to get the values of a host.
      But thank you guys always for pointing me in the right direction.

      posted in FOG Problems
      J
      Jamaal
    • RE: Powershell API Module

      @jj-fullmer said in Powershell API Module:

      vscode

      Thanks jj,

      I’ll install & try out.

      posted in Tutorials
      J
      Jamaal
    • 1 / 1