Add Network Adapter Configuration Tool and Presets Management
- Created NetworkAdapter.psm1 module for managing network adapters. - Implemented functions for displaying adapter information, setting DHCP/manual configurations, and managing DNS settings. - Added functionality to save and load network presets in JSON format. - Introduced a schema for validating the presets structure. - Added a .gitignore file to exclude local network presets from version control. - Created a test-syntax.ps1 script to validate PowerShell syntax for the main script files.
This commit is contained in:
parent
905789c3ad
commit
d006870d96
5 changed files with 842 additions and 461 deletions
35
network-presets.schema.json
Normal file
35
network-presets.schema.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Network Presets Schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"presets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adapterGuid": { "type": "string" },
|
||||
"adapterName": { "type": "string" },
|
||||
"adapterDescription": { "type": "string" },
|
||||
"presets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"type": { "type": "string", "enum": ["Manual","DHCP"] },
|
||||
"ipAddress": { "type": "string" },
|
||||
"prefixLength": { "type": "integer", "minimum": 0, "maximum": 32 },
|
||||
"gateway": { "type": ["string","null"] },
|
||||
"dns": { "type": "array", "items": { "type": "string" } }
|
||||
},
|
||||
"required": [ "name", "type" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [ "adapterGuid", "presets" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [ "presets" ]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue