{"id":14063784,"url":"https://github.com/hmiller10/HelperFunctions","last_synced_at":"2025-07-29T16:31:53.858Z","repository":{"id":57892521,"uuid":"459136779","full_name":"hmiller10/HelperFunctions","owner":"hmiller10","description":"Functions I use repeatedly when coding PowerShell","archived":false,"fork":false,"pushed_at":"2024-11-29T17:54:27.000Z","size":886,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-29T18:28:33.289Z","etag":null,"topics":["boottime","cimsession","datatable","datetime","reboot","shutdown"],"latest_commit_sha":null,"homepage":"https://hmiller10.github.io/HelperFunctions/","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmiller10.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-02-14T11:36:19.000Z","updated_at":"2024-11-29T17:54:30.000Z","dependencies_parsed_at":"2024-03-10T06:33:22.350Z","dependency_job_id":"3000f770-c4cf-4737-8604-1e84770e5de6","html_url":"https://github.com/hmiller10/HelperFunctions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmiller10%2FHelperFunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmiller10%2FHelperFunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmiller10%2FHelperFunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmiller10%2FHelperFunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmiller10","download_url":"https://codeload.github.com/hmiller10/HelperFunctions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228028621,"owners_count":17858419,"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":["boottime","cimsession","datatable","datetime","reboot","shutdown"],"created_at":"2024-08-13T07:03:30.438Z","updated_at":"2024-12-04T01:31:28.991Z","avatar_url":"https://github.com/hmiller10.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# Helper Functions PowerShell Module\n\nThis module contains a collection of PowerShell functions I have found I use/reuse frequently. Consequently, I created this module to include those functions.\n\n## Getting Started\n\n# STEP 1\n### Setup PowerShell to use TLS 1.2\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n\n# STEP 2\n### Prerequisites\nTo publish this module to Azure DevOps I used the NuGet package provider. Therefore, NuGet must be installed on the computer.\n\n```\n$pkgProviders = Get-PackageProvider -ListAvailable -Force -ErrorAction Continue\nif (-not ($pkgProviders.Name.Contains('Nuget')))\n{\ntry\n\t{\n\t\tInstall-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force\n\t}\n\tcatch\n\t{\n\t\t$errorMessage = \"{0}: {1}\" -f $Error[0], $Error[0].InvocationInfo.PositionMessage\n\t\tWrite-Error $errorMessage -ErrorAction Continue\n\t}\n\t\n}\n```\n\nThe PowerShellGet module is also required. It can be installed from PowerShellGallery.com\n\n```\nInstall-Module PowerShellGet -Repository PSGallery -Force\n```\n\nOne option to authenticate to Azure DevOps is using a Personal Access Token (PAT). See:\nhttps://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops\n\nOnce the PAT token has been generated, save it in a secure location. I use Keepass to save mine for reuse.\n\n# STEP 3\n### Publish Module to Azure DevOps\n\n1. Create Azure DevOps Credential Object. Open an elevated PowerShell prompt as Administrator. Type:\n\n```\n$creds = Get-Credential\n```\nUser is not required, however I typically enter my personal e-mail address.\nPassword should be your PAT token.\n\n2. If you have not already created an artifact repository in Azure DevOps, you will need to create that before proceeding. To register your PS repository in PowerShell, type:\n\n```\nRegister-PSRepository -Name HMMPackages -SourceLocation 'Insert SourceLocation created when artifact repository was created' -InstallationPolicy Trusted -Credential $creds\n```\n\n3. Connect to Azure artifact package feed. (Only needs to be done once.)\n\n```\n.\\nuget.exe sources Add -Name HMMPackages -Source 'Insert repository source location to .json file' -Force\n```\n\n4. Create NuGet configuration file (Only needs to be done once.) If there are no dependencies for the package, remove the dependencies section from the .nuspec file\n\n```\n\\nuget.exe spec 'HelperFunctions' -Force\n```\n\n5.  Create NuGet package (Needs to be done with every module version.) \n\nNOTE: Module version in .psd1 file must match version number in .nuspec file.\nNOTE: In order to work around  the \"WARNING: Issue: PowerShell file outside tools folder.\" use the -NoPackageAnalysis parameter\n\n```\n.\\nuget pack \"HelperFunctions.nuspec\" -NoPackageAnalysis\n```\n\n6. Publish the package to the artifact feed.\n\n```\n.\\nuget.exe push -Source 'Insert Repository Name Here' -ApiKey az (can really be anything) \"HelperFunctions.0.0.1.nupkg\"\n```\n\n7. Verify the module exists in the artifact feed.\n\n```\nFind-Module -Repository 'HelperFunctions' -Credential $creds\n```\nEnd with an example of getting some data out of the system or using it for a little demo\n\n## Running the tests\n\nAt present, I have not yet created Pester tests for all functions. I have run each function through PSScriptAnalyzer.\n\n## Deployment\n\n# STEP 4\n### Installing\n1. Install Module\n\n```\nInstall-Module 'HelpFunctions' -Repository 'Insert PS Repository Name' -Credential $creds -Force -AllowClobber\n\n### Update Module\n\nUpdate-Module -Name HelperFunctions -Force\n\n# Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). \n\n# Authors\n\n* Heather Miller\n\nSee also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.\n\n# License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](License.md) file for details\n\n# Acknowledgments\n\n* Hat tip to anyone who's code was used:\n\t* Thomas Ashworth\n\t* Mike F Robbins\n* Inspiration:\n\t* Adam Bertram\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmiller10%2FHelperFunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmiller10%2FHelperFunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmiller10%2FHelperFunctions/lists"}