Hi I have been looking for a powershell script or vbs or batch file to backup & restore network settings on a windows 10 local machine<\/p>\n
IP,subnetmask,gateway and both dns<\/p>\n
I have been playing with netsh command but only restores ip and subentmask<\/p>\n
netsh interface dump > netcfg.txt<\/p>\n
netsh exec netcfg.txt<\/p>\n
best regads<\/p>","upvoteCount":4,"answerCount":3,"datePublished":"2020-08-25T18:48:41.000Z","author":{"@type":"Person","name":"spiceuser-c16be","url":"https://community.spiceworks.com/u/spiceuser-c16be"},"suggestedAnswer":[{"@type":"Answer","text":"
Hi I have been looking for a powershell script or vbs or batch file to backup & restore network settings on a windows 10 local machine<\/p>\n
IP,subnetmask,gateway and both dns<\/p>\n
I have been playing with netsh command but only restores ip and subentmask<\/p>\n
netsh interface dump > netcfg.txt<\/p>\n
netsh exec netcfg.txt<\/p>\n
best regads<\/p>","upvoteCount":4,"datePublished":"2020-08-25T18:48:41.000Z","url":"https://community.spiceworks.com/t/network-settings-backup-restore-powershell-script/773591/1","author":{"@type":"Person","name":"spiceuser-c16be","url":"https://community.spiceworks.com/u/spiceuser-c16be"}},{"@type":"Answer","text":"
well have you tried to get that information via powershell?<\/p>\n
What have you tried? where are you stuck?<\/p>\n
In powershell, you can usually use the same commandlet you use to get the data, to set the data.<\/p>\n
Get-NetIPAddress\nSet-NetIPAddress\n<\/code><\/pre>\nso find the cmdlets that get and set the info and you can store in like a CSV or JSON or whatever file format you want really.<\/p>\n
Give it a shot, post the code you have tried when you get stuck.<\/p>\n
If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>\n