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

    Topics created by Jamaal

    • J

      Unsolved FOG API question

      FOG Problems
      • • • Jamaal
      2
      0
      Votes
      2
      Posts
      87
      Views

      J

      Ok,

      I finally figured this out. I know it’s not the best method, but I prefer this than having the wording “plain text” Here’s what I did in case someone needs to do the same.

      I read that API tokens do not go well as a securestring. Here are some references:
      https://jamesone111.wordpress.com/2020/04/10/transformers-for-powershell-parameters-which-take-secrets/, and https://github.com/Azure/azure-powershell/issues/25533.

      So in order to get past this, I needed to create another variable as show below:

      $testapi1 = [pscredential]::new(“token”,$yourtoken)

      You’re basically adding the pscredential above like you’re going to setup a username, but you put something like “token” or any wording as a placeholder for the username, then put the token in.

      Then after you define the header you do something like this: $testheader.add(fog-user-token’,$testapi1.GetNetworkCredential().password)

      Again it’s not the best method, but I also read a way when you do read-host -aseecurestring and save your api there as a variable, you can dispose that variable so it doesn’t stay in memory.

      $test.disposeof

      If someone has any better ideas, please let me know as I’m always on here learning new things and want to share as well. This basically can be closed out.

    • J

      Dell Latitude 5530 issue

      Windows Problems
      • • • Jamaal
      4
      0
      Votes
      4
      Posts
      785
      Views

      J

      @george1421

      Ok, let me try some things this week and let you guys know. Thanks guys.

    • J

      Powershell and fog

      Tutorials
      • • • Jamaal
      8
      0
      Votes
      8
      Posts
      1.2k
      Views

      S

      @jamaal said in Powershell and fog:

      . I’m not sure on how to check the apache error logs.

      You need console access (e.g. SSH) to your FOG server. See my signature on where to find the logs files.

    • J

      Need help to understand host.class.php

      FOG Problems
      • • • Jamaal
      2
      0
      Votes
      2
      Posts
      437
      Views

      J

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

    • J

      Fog Location help via FOG API

      FOG Problems
      • • • Jamaal
      3
      0
      Votes
      3
      Posts
      436
      Views

      J

      @jamaal said in Fog Location help via FOG API:

      @jamaal said in Fog Location help via FOG API:

      Hello, all

      I’m starting to get closer, but not sure what I’m missing. I read up on pscustomobject and I did the following in the script. So in the first screen shot, I got the member properties from get-foghost -hostname $machinename | get-member

      The screenshot called “before”, doesn’t have the location field.

      before.PNG

      What I did was created a pscustomobject by creating a variable called $member

      so $member = new-object -typename psobject
      The screenshot I did later was called “after”
      after.PNG

      I then did $member | get-member and it added location as you can see in the screen shot.
      In the parameter, I did location = Westbury for example. Here’s some screen shots of my script.

      parameters.PNG

      code that I used to add location:
      location.PNG

      So I already have the plugin Location installed with values such as Woodbury and Edison.

      I’m trying to get Powershell to just load my section from $location to location as seen below, but it’s not working despite I used the pscustomobject
      accomplish.PNG

      I also tried adding location under $hostjson to see if this helps before as well.
      hostjson.PNG

      Ok,

      This is resolved now. Here are the steps I did to fix this in case someone else needs this in their Powershell script.

      You need to go the Powershell module file in C:\Program Files\WindowsPowerShell\Modules\FogApi\2103.2.12

      Once in there, open up the FogApi.psm1 file and look for the line that says $coreObjects = @(

      add this to the line in alphabetical order:

      “location” and save the file.

      Once you did that, go to powershell and type in:

      Get-FogObject -type object -coreObject location

      If done right, you’ll see the location correspond to the location plug in you installed.
      location.PNG

      and after:

      location2.PNG

      You don’t need to mess with the pscustomobject because when you install the plugin and edit the psm1 file, it will do it automatically for you.

      pscustomobject location.PNG

      This can be closed. I’ll create a tutorial on the exact steps because you need to create storage nodes if you have multiple sites in mind.

    • J

      Creating Location for api Powershell

      Tutorials
      • • • Jamaal
      1
      0
      Votes
      1
      Posts
      203
      Views

      No one has replied

    • J

      Powershell core

      Tutorials
      • • • Jamaal
      1
      0
      Votes
      1
      Posts
      236
      Views

      No one has replied

    • J

      FOG API help

      General
      • • • Jamaal
      4
      0
      Votes
      4
      Posts
      332
      Views

      S

      @jamaal said in FOG API help:

      One more question. How would I add location via api?

      Not something I can properly answer. Though looking at the repo I think the @JJ-Fullmer’s powershell module does not handle locations: https://github.com/darksidemilk/FogApi/tree/master/FogApi/Public

    • J

      fog API powershell help

      General
      • fogapi-psmodule • • Jamaal
      7
      0
      Votes
      7
      Posts
      809
      Views

      JJ FullmerJ

      @Jamaal
      @jj-fullmer said in fog API powershell help:

      Glad I had the code for get-foggroups somewhere to be found. It looks like something weird happened to the get-foggroups function and all the code disappeared from it. I’ll need to get that fixed as soon as I can as that function is used all over the place. I have made an issue for it https://github.com/darksidemilk/FogApi/issues/3

      I just published a new version of the module fixing the issue with get-foggroups and subsequently get-foggroupsbyname if you update to the new version 2103.2.12 those functions should work now.

    • J

      Need Powershell help

      General
      • • • Jamaal
      7
      0
      Votes
      7
      Posts
      511
      Views

      J

      @JJ-Fullmer said in Need Powershell help:

      @Jamaal I believe that the wake on lan is enabled by default, so you don’t need to do anything to include it when creating the deploy task via the api.

      Ok, gotcha.

      Thank you very much for letting me know of this.

    • J

      Solved unable to install CA certificate (MDT 2013)

      FOG Problems
      • • • Jamaal
      8
      0
      Votes
      8
      Posts
      1.4k
      Views

      S

      @Jamaal Good to hear you figured this out. Would have been quite hard for us I reckon.

    • J

      Need a little help with MDT 2013 and Lenovo setup

      Windows Problems
      • • • Jamaal
      1
      0
      Votes
      1
      Posts
      277
      Views

      No one has replied

    • J

      PXE issues

      Windows Problems
      • • • Jamaal
      4
      0
      Votes
      4
      Posts
      1.6k
      Views

      falkoF

      [quote=“astrouga, post: 3670, member: 907”]Sounds like you need to modify your existing DHCP server so it can point to your FOG server:

      [url]http://www.fogproject.org/wiki/index.php/Modifying_existing_DHCP_server_to_work_with_FOG[/url][/quote]

      This should do the trick

    • 1 / 1