FogApi
2607.10.1
# FOG Api Powershell Module
This is a powershell module to simplify the use of the Fog Project API.
This module is used to easily run Fog API commands on your fogserver from a powershell console or script.
FOG is an opensource tool for imaging comptuters, this module uses the API on your internal fog server to
perform almost any operation you can do in the GU
# FOG Api Powershell Module
This is a powershell module to simplify the use of the Fog Project API.
This module is used to easily run Fog API commands on your fogserver from a powershell console or script.
FOG is an opensource tool for imaging comptuters, this module uses the API on your internal fog server to
perform almost any operation you can do in the GUI of Fog and provides you with the ability to extend things further.
It can be used to create more automation or to simply have a command line method of controlling fog operations.
This essentially gives you a crossplatform commandline interface for fog tasks and makes many things easier to automate.
Docs for this module can be found at https://fogapi.readthedocs.io/en/latest/
For more information about FOG see
- https://fogproject.org/
- https://docs.fogproject.org/
- https://github.com/FOGProject
- https://github.com/FOGProject/fogproject
- https://forums.fogproject.org/
# Versioning
The versioning of this module follows this pattern
`{Year|Month}.{Major Version}.{Revision #}`
See https://github.com/darksidemilk/FogApi?tab=readme-ov-file#versioning for more info
# Usage
You can use Set-fogserverSettings to set your fogserver hostname and api keys.
Or, the first time you try to run a command the settings.json file will automatically open in an OS Specific editor.
You can also open the settings.json file and edit it manually before running your first command.
The default settings are explanations of where to find the proper settings since json cannot have comments
Once the settings are set you can utilze the fog documentation found here https://news.fogproject.org/simplified-api-documentation/ that was used to model the parameters for Get-FogObject, Update-FogObject, and Remove-FogObject.
You can also utilize simpler functions of common tasks, see the links below for more info.
# Additional info
- Examples and More: https://github.com/darksidemilk/FogApi/blob/master/README.md
- All Commands - https://fogapi.readthedocs.io/en/latest/commands/
- FogForums module thread: https://forums.fogproject.org/topic/12026/powershell-api-module/2
- Full change log available at https://fogapi.readthedocs.io/en/latest/ReleaseNotes/
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
2018-2026
Package Details
Author(s)
- JJ Fullmer FOG Project
Tags
fog fogapi imaging provisioning fogproject
Functions
Add-FogHostGroup Add-FogHostMac Add-FogResultData Approve-FogPendingMac Deny-FogPendingMac Disable-FogApiHTTPS Dismount-WinEfi Enable-FogApiHTTPS Find-FogObject Get-FogActiveTasks Get-FogGroupAssociations Get-FogGroupByName Get-FogGroups Get-FogHost Get-FogHostAssociatedSnapins Get-FogHostGroup Get-FogHostMacs Get-FogHostPendingMacs Get-FogHosts Get-FogImages Get-FogInventory Get-FogLog Get-FogMacAddresses Get-FogModules Get-FogObject Get-FogScheduledTasks Get-FogSecsSinceEpoch Get-FogServerSettings Get-FogServerSettingsFile Get-FogSetting Get-FogSettings Get-FogSnapinAssociations Get-FogSnapins Get-FogVersion Get-LastImageTime Get-WinBcdPxeID Get-WinEfiMountLetter Install-FogService Invoke-FogApi Mount-WinEfi New-FogHost New-FogObject Receive-FogImage Remove-FogHostGroup Remove-FogObject Remove-UsbMac Repair-FogSnapinAssociations Reset-HostEncryption Resolve-HostID Send-FogGroupTask Send-FogImage Send-FogWolTask Set-FogHostImage Set-FogInventory Set-FogServerSettings Set-FogServerSettingsFileSecurity Set-FogSetting Set-FogSnapins Set-WinToBootToPxe Start-FogSnapin Start-FogSnapins Test-FogVerAbove1dot6 Test-StringNotNullOrEmpty Update-FogGroup Update-FogObject
PSEditions
Dependencies
This module has no dependencies.
Release Notes
# 2607.10.1
Restore Pester work lost during the #55/#56/#57 merge-conflict resolution (#58)
(#59)
* Add group membership CRUD and group task/settings cmdlets
Adds Add-FogHostGroup/Remove-FogHostGroup to manage group membership,
Update-FogGroup to edit a group's own fields, and Send-FogGroupTask to
queue a task against every host in a group at once, closing the gap
called out in #28 where only read/get group functions existed.
Closes #28
* Fix Send-FogGroupTask scheduled-task JSON against verified FOG API
Cross-checked against FOGProject/fogproject (working-1.6 and dev-branch,
identical on both): the scheduledtask table has no groupID column, so a
group scheduled task must set isGroupTask=1 and reuse hostID to hold the
group id, and the generic create route only maps JSON keys that match
its databaseFields exactly, so the task name must be sent as "name" not
"taskName". Add-FogHostGroup/Remove-FogHostGroup/Update-FogGroup were
verified correct as originally written.
* Add named parameters for every Update-FogGroup field
Replaces the hashtable-only interface with explicit named parameters
(Name, Description, Building, Kernel, KernelArgs, KernelDevice, Init,
Hosts, Snapins, Printers, Modules, ImageID) for tab-completable
discoverability, matched to Group's actual databaseFields/edit-route
handling verified against the fog server source. Also supports piping
in a group object (e.g. from Get-FogGroups), editing its scalar
properties directly, and passing it straight back in - those fields
are picked up automatically, with named parameters always taking
precedence. The hashtable -settings param remains as an escape hatch.
* Document that FOG GUI-displayed API tokens are base64-encoded
The fog server has base64-decoded the fog-api-token/fog-user-token
headers since the REST API was introduced (April 2017, identical in
1.5.x stable and working-1.6). The web ui displays both tokens
base64-encoded, so copying them verbatim from the ui - as this module
instructs - has always yielded the correct wire form. Note this in the
Set-FogServerSettings help and README so anyone sourcing a token from
the database directly (raw hex) understands why that fails with a 403.
No transport changes; Invoke-FogApi is correct as-is.
* Run CI on PRs into dev too, and enforce master only merges from dev
build-test.yml's build+test jobs now also run on pull requests targeting
dev, not just master - pure validation (module builds, Pester passes), no
publish/release side effects since tag-and-release.yml is unchanged and
still only fires on a merge to master.
Adds an enforce-dev-to-master job that fails a PR into master whose head
branch isn't dev, addressing exactly the mistake that led to the
accidental master merge/premature release documented in issue #52. This
makes the violation visible as a failing check; making it a hard block
still requires a one-time branch protection rule (require this check to
pass) since no tool here can set that GitHub setting directly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJuKR3A2Vy9mPbKNrRLVED
* Add example tests for the group membership cmdlets
Annotates one example per parameter set (8 total) on Add-FogHostGroup,
Remove-FogHostGroup, Update-FogGroup, and Send-FogGroupTask with the
Expected output: convention, adds the four to the examples pilot list,
and extends the mock with group, groupassociation, and scheduledtask
routes plus matching fixtures. Coverage report goes from 5 to 13
annotated parameter sets. All examples also verified unmocked with
-RealServer against a live fog server seeded to match the fixtures;
7 of 8 pass there - the immediate-task example documents the mocked
task-create fixture shape, same as the existing Send-FogWolTask
convention (a real server returns an empty body for task creation).
* Add dependencies and enforce build order in workflow
* Remove dependency on enforce-dev-to-master
* Fix merge conflict in build-test.yml: keep test job from dev branch
* Update FogApi.psd1
Major change
* Restore Pester work lost during the #55/#56/#57 merge-conflict resolution (#58)
* Restore the Contributing nav entry dropped during merge conflict resolution
docs/Contributing.md has been present on dev and master since PR #54, but
mkdocs.yml's nav entry pointing to it got dropped somewhere in the PR
#55/#56/#57 merge conflict resolutions that followed - the page existed
but wasn't reachable from the site nav. Verified with a real mkdocs build
that it renders and links correctly again.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJuKR3A2Vy9mPbKNrRLVED
* Restore files lost during the PR #55/#56/#57 merge-conflict resolution
An automated merge-conflict resolution while merging PR #57 into dev
(commits a60dc61/75957b6, "accepting incoming (dev branch) changes") ended
up doing the opposite of what its own message says for a large chunk of
files: it silently reverted most of PR #54's pilot Pester work on dev
(and, since PR #56 later merged dev into master, on master too), while
PR #55's separately-added files survived since they never touched the
same conflict.
Lost and now restored to their PR #54 state: CLAUDE.md, Invoke-FogApiTests.ps1,
five Tests/Fixtures/*.json fixtures, Tests/FogApi.Coverage.Tests.ps1,
Tests/Invoke-FogApi.Tests.ps1, the Expected output: annotations on all 8
original pilot functions' .EXAMPLE blocks, and the TestResults/site entries
in .gitignore. Tests/placeholder.md, which the resolution resurrected, is
deleted again. Confirmed the current tree now diffs at zero against the
last known-good commit (eb54b20, the PR #55 merge) except for two later,
legitimate changes that are kept as-is: build-test.yml's `test: needs:
build` and FogApi.psd1's version bump to 2606.10.0.
Verified: full Pester suite passes locally (24/24, up from the CI-breaking
0 caused by Invoke-FogApiTests.ps1 being missing entirely), and
`mkdocs build --strict` renders docs/Contributing.md in the nav again.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJuKR3A2Vy9mPbKNrRLVED
---------
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Full change log history available at https://fogapi.readthedocs.io/en/latest/ReleaseNotes/
FileList
- FogApi.nuspec
- FogApi.psm1
- en-us\FogApi-help.xml
- lib\settings.json
- FogApi.psd1
- en-us\about_FogApi.help.txt
- icons\favicon.png
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 2607.10.1 (current version) | 98 | 7/19/2026 |
| 2606.9.27 | 647 | 6/30/2026 |
| 2509.9.26 | 4,033 | 9/17/2025 |
| 2509.9.25 | 621 | 9/11/2025 |
| 2508.9.23 | 981 | 8/20/2025 |
| 2506.9.22 | 1,096 | 6/17/2025 |
| 2506.9.21 | 17 | 6/16/2025 |
| 2506.9.20 | 8 | 6/16/2025 |
| 2506.9.19 | 6 | 6/16/2025 |
| 2505.9.18 | 202 | 5/14/2025 |
| 2411.9.17 | 9,242 | 11/17/2024 |
| 2409.9.16 | 5,041 | 9/14/2024 |
| 2409.9.4 | 853 | 9/4/2024 |
| 2408.9.3 | 568 | 8/30/2024 |
| 2408.9.2 | 577 | 8/22/2024 |
| 2311.6.4 | 17,248 | 11/17/2023 |
| 2310.6.3 | 564 | 10/11/2023 |
| 2310.6.2 | 15 | 10/11/2023 |
| 2304.5.41 | 3,936 | 4/12/2023 |
| 2302.5.40 | 12 | 4/12/2023 |
| 2302.5.33 | 331 | 3/29/2023 |
| 2302.5.26 | 47 | 3/1/2023 |
| 2209.4.5 | 225 | 10/21/2022 |
| 2209.4.1 | 353 | 10/12/2022 |
| 2208.3.3 | 598 | 8/24/2022 |
| 2208.3.1 | 23 | 8/23/2022 |
| 2103.2.13 | 22 | 8/23/2022 |
| 2103.2.12 | 1,929 | 3/26/2021 |
| 2004.2.2.7 | 77 | 12/3/2020 |
| 2004.2.2.4 | 30 | 11/17/2020 |
| 2002.2.1.2 | 85 | 4/21/2020 |
| 1903.0.0.22 | 99 | 9/25/2019 |
| 1.6 | 289 | 6/11/2018 |
| 1.2 | 35 | 6/5/2018 |