{"id":30586070,"url":"https://github.com/maxmelcher/azhybridbenefit","last_synced_at":"2025-08-29T11:38:41.206Z","repository":{"id":301351891,"uuid":"1008971324","full_name":"MaxMelcher/azhybridbenefit","owner":"MaxMelcher","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-26T11:37:17.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T07:56:36.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/MaxMelcher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-06-26T11:26:00.000Z","updated_at":"2025-06-26T11:37:21.000Z","dependencies_parsed_at":"2025-06-26T12:48:48.435Z","dependency_job_id":null,"html_url":"https://github.com/MaxMelcher/azhybridbenefit","commit_stats":null,"previous_names":["maxmelcher/azhybridbenefit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaxMelcher/azhybridbenefit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMelcher%2Fazhybridbenefit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMelcher%2Fazhybridbenefit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMelcher%2Fazhybridbenefit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMelcher%2Fazhybridbenefit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxMelcher","download_url":"https://codeload.github.com/MaxMelcher/azhybridbenefit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMelcher%2Fazhybridbenefit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272678879,"owners_count":24975251,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-29T11:38:37.606Z","updated_at":"2025-08-29T11:38:41.199Z","avatar_url":"https://github.com/MaxMelcher.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Hybrid Benefit Management Tool\r\n\r\nThis Python script enables Azure Hybrid Benefit for Windows Server virtual machines in Azure, allowing you to use your on-premises Windows Server licenses in the cloud and reduce costs.\r\n\r\n## What is Azure Hybrid Benefit?\r\n\r\nAzure Hybrid Benefit is a licensing benefit that helps you reduce the costs of running your workloads in the cloud. It allows you to use your on-premises Software Assurance-enabled Windows Server licenses on Azure VMs, paying only for the base compute cost.\r\n\r\n## Prerequisites\r\n\r\n- Python 3.10 or higher\r\n- Azure CLI installed and authenticated (`az login`)\r\n- Required Python packages (install with `pip install -r requirements.txt`)\r\n- Contributor permissions to modify virtual machines in the provided Azure subscription.\r\n\r\n## Installation\r\n\r\n1. Clone this repository or download the script\r\n2. Install dependencies:\r\n\r\n   ```bash\r\n   pip install -r requirements.txt\r\n   ```\r\n\r\n3. Ensure you're logged in to Azure CLI:\r\n\r\n   ```bash\r\n   az login\r\n   ```\r\n\r\n## Usage\r\n\r\nThe script takes three required parameters:\r\n\r\n- `subscription_id`: Your Azure subscription ID\r\n- `resource_group`: The resource group containing the VM\r\n- `vm_name`: The name of the virtual machine\r\n\r\n### Basic Usage\r\n\r\n```bash\r\npython enable_hybrid_benefit.py \u003csubscription_id\u003e \u003cresource_group\u003e \u003cvm_name\u003e\r\n```\r\n\r\n### Example\r\n\r\n```bash\r\npython enable_hybrid_benefit.py 568aee08-3760-4b25-a6a5-087028e0726c hybrid test\r\n```\r\n\r\nThis command will:\r\n\r\n1. Connect to Azure using your CLI credentials\r\n2. Fetch the specified VM from the resource group\r\n3. Display the current license type\r\n4. Update the VM to enable Azure Hybrid Benefit (set `licenseType` to `Windows_Server`)\r\n5. Confirm the update was successful\r\n\r\n## What the Script Does\r\n\r\n1. **Authentication**: Uses Azure CLI credentials for authentication\r\n2. **VM Retrieval**: Fetches the current state of the specified VM\r\n3. **License Update**: Changes the `licenseType` property to `Windows_Server`\r\n4. **Verification**: Confirms the change was applied successfully\r\n\r\n## Important Notes\r\n\r\n- This script is specifically for Windows Server VMs\r\n- Ensure you have the proper Windows Server licenses with Software Assurance\r\n- The change may take a few minutes to complete\r\n\r\n## Error Handling\r\n\r\nIf you encounter authentication issues, make sure you're logged in to Azure CLI:\r\n\r\n```bash\r\naz login\r\naz account show  # Verify you're logged in to the correct subscription\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the terms specified in the LICENSE file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmelcher%2Fazhybridbenefit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmelcher%2Fazhybridbenefit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmelcher%2Fazhybridbenefit/lists"}