{"id":21406855,"url":"https://github.com/ms-luf/build-freeipamodule","last_synced_at":"2025-06-12T22:07:19.229Z","repository":{"id":137505197,"uuid":"158113619","full_name":"MS-LUF/Build-FreeIPAModule","owner":"MS-LUF","description":"a few PowerShell cmdlets to build your own IPA/FreeIPA Powershell management Module","archived":false,"fork":false,"pushed_at":"2020-02-25T07:27:41.000Z","size":979,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-16T17:17:31.380Z","etag":null,"topics":["freeipa","freeipa-client","powershell","powershell-module"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MS-LUF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-18T18:22:06.000Z","updated_at":"2021-12-08T08:59:36.000Z","dependencies_parsed_at":"2023-06-19T08:48:29.030Z","dependency_job_id":null,"html_url":"https://github.com/MS-LUF/Build-FreeIPAModule","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MS-LUF/Build-FreeIPAModule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FBuild-FreeIPAModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FBuild-FreeIPAModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FBuild-FreeIPAModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FBuild-FreeIPAModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MS-LUF","download_url":"https://codeload.github.com/MS-LUF/Build-FreeIPAModule/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FBuild-FreeIPAModule/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259539130,"owners_count":22873341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["freeipa","freeipa-client","powershell","powershell-module"],"created_at":"2024-11-22T16:43:07.943Z","updated_at":"2025-06-12T22:07:19.079Z","avatar_url":"https://github.com/MS-LUF.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build-FreeIPAModule\r\na few PowerShell cmdlets to build your own IPA/FreeIPA Powershell management Module - https://github.com/freeipa/freeipa\r\n\r\n(c) 2018-2020 lucas-cueff.com Distributed under Artistic Licence 2.0 (https://opensource.org/licenses/artistic-license-2.0).\r\n\r\n## Description\r\nBuild-FreeIPAModule.psm1 PowerShell module provides a set of PowerShell cmdlets to build your own FreeIPA/IPA management module to manage your FreeIPA/IPA infrastructure from Powershell (Core/Classic - Windows/Linux/Mac Os).\r\nThis module will use JSON_Metadata and env APIs from your IPA Server to dynamically generate all PowerShell functions code and bindings for your personal environment.\r\n\r\n## Note\r\nFor more information on the FreeIPA API, please connect to the web interface on your IPA Server : https://yourIPA.domain.tld/ipa/ui/#/p/apibrowser/type=command\r\n**Don't forget to trust your IPA AC / ssl certificate locally before using the Powershell Module.**\r\n**Please unload your manage-FreeIPA module before loading the build module because some functions and alias are shared**\r\n```\r\n\tC:\\PS\u003e Remove-Module Manage-FreeIPA\r\n```\r\n\r\n## Version\r\nv0.8 : Add multi config file as requested by baldator + Fix securestring issue reported by nadinezan + add proxy management to connect to IPA + simplify error management in catch\r\n\r\n## Install Build-FreeIPAModule from PowerShell Gallery repository\r\nYou can easily install it from powershell gallery repository https://www.powershellgallery.com/packages/Build-FreeIPAModule/ using a simple powershell command and an internet access :-)\r\n```\r\n\tInstall-Module -Name Build-FreeIPAModule\r\n```\r\n\r\n## import module from PowerShell \r\n```\r\n\tC:\\PS\u003e import-module Build-FreeIPAModule.psm1\r\n```\r\n\r\n## Exported Functions and Alias\r\n### Functions\r\n- Export-IPAEnv\r\n- Export-IPASchema\r\n- Get-FreeIPAAPIAuthenticationCookie\r\n- Get-IPABindingCondition\r\n- Get-IPACmdletBinding\r\n- Get-IPACmdletBindingValue\r\n- Get-IPAPCmdletName\r\n- Get-ScriptDirectory\r\n- Import-FreeIPAAPICrendentials\r\n- Invoke-FreeIPAAPIEnv\r\n- Invoke-FreeIPAAPIJson_Metadata\r\n- Invoke-FreeIPAAPISessionLogout\r\n- Publish-IPAModule\r\n- Set-FreeIPAAPICredentials\r\n- Set-FreeIPAAPIServerConfig\r\n- Set-FreeIPAProxy                        \r\n### Alias\r\n- Connect-IPA\r\n- Disconnect-IPA\r\n- Get-IPAEnvironment\r\n- Get-IPAJsonMetadata\r\n- Import-IPACrendentials\r\n- Set-IPAServerConfig\r\n- Set-IPACredentials\r\n- Set-IPAProxy                                     \r\n\r\n## Use the module\r\n### Build a module based on last FreeIPA version using the official FreeIPA online demo environment\r\nFreeIPA.org provides an online environment for testing purpose with the last official release available.\r\nFor more information : https://www.freeipa.org/page/Demo\r\n### Set your config and be authenticated with your server\r\nSet your encrypted credential in cache for future use and set it also in an external file if necessary (EncryptKeyInLocalFile and MasterPassword)\r\n```\r\n\tC:\\PS\u003e Set-IPACredentials -AdminLogin (ConvertTo-SecureString -String \"adminlogin\" -AsPlainText -Force) -AdminPassword (ConvertTo-SecureString -String \"adminpass\" -AsPlainText -Force)\r\n```\r\nSet your FreeIPA server URL info\r\n```\r\n\tC:\\PS\u003e Set-IPAServerConfig -URL https://yourIPA.domain.tld\r\n```\r\nGet your authentication cookie to be authenticated with your APIs\r\n```\r\n\tC:\\PS\u003e Connect-IPA -UseCachedURLandCredentials\r\n```\r\n### Export your current environment and schema\r\nGenerate your PowerShell environement file from your current IPA environment (default file is IPAEnv.xml)\r\n```\r\n\tC:\\PS\u003e Export-IPAEnv\r\n```\r\nGenerate your Powershell schema file from your current IPA environment (default file is IPASchema.xml)\r\n```\r\n\tC:\\PS\u003e Export-IPASchema\r\n```\r\n### Managing your network access to IPA front end through web proxy\r\nYou can set a proxy (with authentication or not, direct connection...). For instance, to set a proxy with a SSO with current security context :\r\n```\r\n    C:\\PS\u003eSet-IPAProxy -proxy \"http://myproxy:3128\" -ProxyUseDefaultCredentials\r\n```\r\n### Generate your custom module based on your current IPA configuration\r\nGenerate your custom IPA PowerShell management module based on your schema and environment\r\n```\r\n\tC:\\PS\u003e Publish-IPAModule -IPASchemaRef \"C:\\Users\\tst\\Documents\\GitHub\\Build-FreeIPAModule\\IPAschema.xml\" -IPAEnvRef \"C:\\Users\\tst\\Documents\\GitHub\\Build-FreeIPAModule\\IPAenv.xml\" -BuilderName \"You\" -Version \"1.0\" -VersionComment \"Your First Release\"\r\n\r\n\r\n\tManifestFileName : C:\\Users\\tst\\Documents\\GitHub\\Build-FreeIPAModule\\Manage-FreeIPA_Build_636781623970522876.psd1\r\n\tVersion          : 1.0\r\n\tAlias            : {Add-IPAAci, Remove-IPAAci, Find-IPAAci, Set-IPAAci...}\r\n\tBuildingDate     : 18/11/2018 18:26:37\r\n\tModuleFileName   : C:\\Users\\lcu\\Documents\\GitHub\\Build-FreeIPAModule\\Manage-FreeIPA_Build_636781623970522876.psm1\r\n\tBuilder          : You\r\n\tChangelog        : Your First Release\r\n\tFunctions        : {Invoke-FreeIPAAPIAci_Add, Invoke-FreeIPAAPIAci_Del, Invoke-FreeIPAAPIAci_Find, Invoke-FreeIPAAPIAci_Mod...}\r\n```\r\nDisconnect from the server\r\n```\r\n\tC:\\PS\u003e Disconnect-IPA\r\n```\r\n### Example : Automate all the things :)\r\nCheck the sample script \"Sample_Generate-FunctionsFromAPI.ps1\" to have some idea ;)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fms-luf%2Fbuild-freeipamodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fms-luf%2Fbuild-freeipamodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fms-luf%2Fbuild-freeipamodule/lists"}