{"id":20680283,"url":"https://github.com/markwragg/powershell-subnet","last_synced_at":"2025-04-19T23:54:47.772Z","repository":{"id":51383978,"uuid":"180766981","full_name":"markwragg/PowerShell-Subnet","owner":"markwragg","description":"A PowerShell module for cmdlets related to network subnet calculations","archived":false,"fork":false,"pushed_at":"2024-09-07T11:58:02.000Z","size":70,"stargazers_count":20,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-19T23:54:43.700Z","etag":null,"topics":["powershell-module","subnet-calculator"],"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/markwragg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2019-04-11T10:14:13.000Z","updated_at":"2024-09-30T08:58:36.000Z","dependencies_parsed_at":"2024-09-07T12:54:32.799Z","dependency_job_id":"7647f969-7f77-42b4-a955-ee5e2c246b6f","html_url":"https://github.com/markwragg/PowerShell-Subnet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-Subnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-Subnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-Subnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-Subnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markwragg","download_url":"https://codeload.github.com/markwragg/PowerShell-Subnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830852,"owners_count":21331357,"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":["powershell-module","subnet-calculator"],"created_at":"2024-11-16T21:30:46.708Z","updated_at":"2025-04-19T23:54:47.757Z","avatar_url":"https://github.com/markwragg.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PowerShell-Subnet\n\n[![Build Status](https://dev.azure.com/markwragg/GitHub/_apis/build/status/markwragg.PowerShell-Subnet?branchName=master)](https://dev.azure.com/markwragg/GitHub/_build/latest?definitionId=10\u0026branchName=master) ![coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)\n\nA PowerShell module for cmdlets related to network subnet calculations.\n\n## Installation\n\nThe module is published in the PSGallery, so if you have PowerShell 5 can be installed by running:\n\n```powershell\nInstall-Module Subnet -Scope CurrentUser\n```\n\n## Usage\n\nGet the subnet details for a specified network address and mask using slash notation:\n\n```powershell\nGet-Subnet 192.168.4.56/24\n```\n\nResult:\n\n```text\nIPAddress        : 192.168.4.56\nMaskBits         : 24\nNetworkAddress   : 192.168.4.0\nBroadcastAddress : 192.168.4.255\nSubnetMask       : 255.255.255.0\nNetworkClass     : C\nRange            : 192.168.4.0 ~ 192.168.4.255\nHostAddresses    : {192.168.4.1, 192.168.4.2, 192.168.4.3, 192.168.4.4...}\nHostAddressCount : 254\n```\n\nGet the subnet details for a specified network address and mask, as specified via the `-MaskBits` parameter:\n\n```powershell\nGet-Subnet -IP 192.168.4.56 -MaskBits 20\n```\n\nResult:\n\n```text\nIPAddress        : 192.168.4.56\nMaskBits         : 20\nNetworkAddress   : 192.168.0.0\nBroadcastAddress : 192.168.15.255\nSubnetMask       : 255.255.240.0\nNetworkClass     : C\nRange            : 192.168.0.0 ~ 192.168.15.255\nHostAddresses    : {192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4...}\nHostAddressCount : 4094\n```\n\nGet the subnet details for the current local network IP:\n\n```powershell\nGet-Subnet\n```\n\n## Other Features\n\n- If the subnet size specified is larger than a /16, the cmdlet will not return the host addresses by default, and instead warn that this would take some time.\nIf you want to force the return of host addresses for these subnets, use `-Force`.\n- If no subnet mask size is specified, the cmdlet will use the default size for the class of address, and show a warning that it has done so.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Fpowershell-subnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkwragg%2Fpowershell-subnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Fpowershell-subnet/lists"}