FogApi.psd1

#
# Module manifest for module 'FogApi'
#
# Generated by: JJ Fullmer, FOG Project
#
# Generated on: 7/19/2026
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'FogApi.psm1'

# Version number of this module.
ModuleVersion = '2607.10.1'

# Supported PSEditions
CompatiblePSEditions = 'Desktop', 'Core'

# ID used to uniquely identify this module
GUID = '7aa922fa-bb4f-46a0-a478-684e9535c65d'

# Author of this module
Author = 'JJ Fullmer, FOG Project'

# Company or vendor of this module
CompanyName = 'FOG Project'

# Copyright statement for this module
Copyright = '2018-2026'

# Description of the functionality provided by this module
Description = '
# 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 version of the PowerShell engine required by this module
PowerShellVersion = '5.1'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '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'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'Add-FogGroupHost', 'Add-FogHost', 'Add-FogObject', 'Add-FogSnapins', 
               'Capture-FogImage', 'Deploy-FogImage', 'Get-FogAssociatedSnapins', 
               'Get-FogGroup', 'Get-FogHostInventory', 
               'Get-FogHostSnapinAssociations', 'Get-FogHostSnapins', 'Get-FogMacs', 
               'Get-MacsForHost', 'Get-WinInventoryForFog', 'Invoke-FogImageCapture', 
               'Pull-FogImage', 'Push-FogImage', 'Remove-FogGroupHost', 
               'Remove-FogMac', 'Reset-FogHostEncryption', 'Save-FogImage', 
               'Set-FogGroup', 'Set-FogObject'

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

    PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        Tags = 'fog', 'fogapi', 'imaging', 'provisioning', 'fogproject'

        # A URL to the license for this module.
        LicenseUri = 'https://github.com/darksidemilk/FogApi/blob/master/LICENSE'

        # A URL to the main website for this project.
        ProjectUri = 'https://github.com/darksidemilk/FogApi'

        # A URL to an icon representing this module.
        IconUri = 'https://cdn.statically.io/gh/darksidemilk/FogApi/0ed5e87e/FogApi/icons/favicon.png'

        # ReleaseNotes of this module
        ReleaseNotes = '
# 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/'


        # Prerelease string of this module
        # Prerelease = ''

        # Flag to indicate whether the module requires explicit user acceptance for install/update/save
        # RequireLicenseAcceptance = $false

        # External dependent modules of this module
        # ExternalModuleDependencies = @()

    } # End of PSData hashtable


    # Title
    Title = 'FogApi'

} # End of PrivateData hashtable

# HelpInfo URI of this module
HelpInfoURI = 'https://fogapi.readthedocs.io/en/latest/'

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}