Releases: darksidemilk/FogApi
Releases · darksidemilk/FogApi
2303.5.26
FogAPI Powershell Module 2303.5.26
This version (released in March 2023 (2303) major version 5, revision 26) represents lots of improvements and preperations for new versions of fog
See also https://www.powershellgallery.com/packages/FogApi/2302.5.26
You can update the module with
Update-Module FogApi
Install for new systems with
Install-Module FogApi
Configure/connect the module to your fog server with
Set-FogServerSettings
- BREAKING CHANGE (maybe) - in preparation for fog version 1.6, made it so there is always a property of 'data' in the return value of the main get-fogobject function. i.e. before
$hosts = get-fogobject -type object -coreobject host
would have a property like $hosts.hosts to get to the result data. in 1.6 all paths return a unified .data instead of being object specific. If you're using the 1.6 branch, this will work as expected now, on 1.5.x it will add that .data property by copying the $hosts.hosts property (or other object specific return) into a new $hosts.data property. Both properties still exists, so until more move to 1.6 existing scripts you may have will still work but they will need to reference .data before upgrading to fog 1.6. All the helper functions (i.e. get-foghost, get-foghosts) will return just the correct result data in any version of fog. - Also related to 1.6 updated logic to get individual records from a list as the output of listing all of an object from fog 1.6 gives different fields in list view vs individual view. Added things to make this work closer to current operations while benefitting from the faster searches
- Added search function
Find-FogObject
in 1.6 you can use unisearch to search all object types for a string. For 1.5.x you can search a given object type for any field containing a string. i.e.Find-FogObject -type search -coreobject host -stringToSearch "someHostName"
will search all hosts and all host fields for someHostName, so it could be the hostname, or could be a note in a description or what have you. When we move to fog 1.6 you can doFind-FogObject -type search -coreobject unisearch -stringtosearch "search all the things for this"
will return results of anything in any object that matches the string, this is NOT implemented in fog 1.5.x - Added file security to saved api key settings file, on linux/mac it will be in a new path (
$home/.FogApi/api-settings.json
) with chmod of 700 so only the owner can read/write the file and its in a more standard path for *nix systems. For windows the acl is set to an equivalent where only the owning user can read/write. - fixed bugs related to validating input, especially for macadressesassociations (i.e. adding new macs with
Add-FogHostMac
or approving pending macs with `get-foghostpendingmacs | % { approve-fogpendingmac - Fixes to set-fogserversettings -interactive so it actually saves after the prompting
- Various other improvements and bug fixes
Full Changelog: 2208.3.1...2303.5.26
2208.3.1
- Added serialnumber option for
Get-FogHost
- Added faster processing for
Get-FogHost -hostid
so it gets it directly rather than getting all hosts and then searching - Added Get-LastImageTime function to get a hosts last image history log entry, can search for the host by serialnumber (prompts for barcode input by default)
2208.3.0
Releasing a new major version.
- adding deploy and capture functions deploy-fogimage and receive-fogimage
- using ciminstance instead of wmi for get-foginventory on windows machines for powershell core compatibility,
- added -fromfog switch for get-foginventory and using same behavior for when run from linux
- adding start-fogsnapin single snapin functionality.
- added get-fogimages helper function to get all fog images that currently exist in the fog server.
2103.2.12
Published new version in gallery https://www.powershellgallery.com/packages/FogApi/2103.2.12
2004.2.2.4
2004.2.2.4
Changed get-macsforhost to Get-FoghostMacs. Added output if get-foghost returns multiple hosts
2004.2.2.3
fix release note formatting error
2004.2.2.2
added try catch for ciminstance for powershell 7 compatibility in windows when getting the current foghost without params
2004.2.2.1
* Mainly a bug fix release for issues with pending mac handling.Ended up adding some extra helper functions along the way
* Added more get functions for ease of use including
- Get-FogGroupAssociations
- Get-FogGroupByName
- Get-FogGroups
- Get-FogHostGroup (replaces Get-FogGroup, but kept Get-FogGroup as an alias as to not break anyones scripts)
- Get-FogMacAddresses (has alias of Get-FogMacs)
- Get-MacsForHost
* Fixed Approve-FogPendingMac so it makes a given mac not pending instead of keeping it pending
* Fixed Get-PendingMacsForHost so it uses less pipeline and more separate commands that was causing it to return all pending macs in some cases, rather than just for a given host
* Added hostID param to get-foghost so you can get a host from the internal hostID if you already have that
2002.2.1.2
2002.2.1.2
Description in manifest was too long
2002.2.1.1
Updated documentation on most functions, all have at least some basic info. Also linked all documentation to https://fogapi.readthedocs.io/en/latest/ for online versions