PublishToGallery.ps1
# PowerShell Gallery Publishing Commands for EIDHealthAgentTroubleshooter v0.0.3 # Step 1: Set your API key (replace 'YOUR_API_KEY' with your actual key) # $ApiKey = "YOUR_API_KEY" # Step 2: Navigate to the module directory # Set-Location "c:\Work\PowerShell Codes\Health Agent Report\EIDHealthAgentTroubleshooter" # Step 3: Test the module one more time # Test-ModuleManifest .\EIDHealthAgentTroubleshooter.psd1 # Step 4: Publish the module # Publish-Module -Path . -NuGetApiKey $ApiKey -Verbose # Alternative: If you want to do a dry run first (WhatIf) # Publish-Module -Path . -NuGetApiKey $ApiKey -WhatIf # Step 5: Verify the publication # Find-Module -Name EIDHealthAgentTroubleshooter -AllVersions #============================================================================== # IMPORTANT NOTES: #============================================================================== # 1. Make sure you are the owner of the EIDHealthAgentTroubleshooter package # 2. The API key must have permission to update this specific package # 3. Version 0.0.3 will be published (as defined in the .psd1 file) # 4. The module will be available on PowerShell Gallery within a few minutes #============================================================================== # Example of complete workflow: <# $ApiKey = "oy2abc123def456ghi789jkl012mno345pqr678stuv901wxyz234" Set-Location "c:\Work\PowerShell Codes\Health Agent Report\EIDHealthAgentTroubleshooter" Test-ModuleManifest .\EIDHealthAgentTroubleshooter.psd1 Publish-Module -Path . -NuGetApiKey $ApiKey -Verbose Find-Module -Name EIDHealthAgentTroubleshooter -AllVersions #> |