Import-Module Servermanager
Add-WindowsFeature WINS-Server
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$computer = [Microsoft.VisualBasic.Interaction]::InputBox("Enter Host of Replication Partner", "Computer", "$env:computername")
$myip=((ipconfig | findstr [0-9].\.)[0]).Split()[-1]
$partner=([System.Net.Dns]::GetHostaddresses("$computer".split('.')[0]))[0].ipaddresstostring
netsh wins server $myip add partner Server=$partner type=2
netsh wins server $partner add partner Server=$myip type=2
Here you will find different solutions, designs, and findings from different projects I've worked on.
Tuesday, August 30, 2011
Powershell Script to automate WINS install/configuration
Here's a short powershell script I wrote that will automate the installation of WINS server and configure a two way replication partnership.
Labels:
Powershell
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment