Surfing all over the net, I found a very handy powershell cheat sheet that was put together by Ben Pearce. Anyways, here’s the download link (just click on the picture).
Big hello to the guys from www.bug.hr
Surfing all over the net, I found a very handy powershell cheat sheet that was put together by Ben Pearce. Anyways, here’s the download link (just click on the picture).
Big hello to the guys from www.bug.hr
Tired of old point and click interface?
Powershell is the new purple in computer world
haha…Seriously!
So, here’s a little script that will add the Ip address you want to the existing firewall rule.
As you can see, it fairly simple, and there’s no need to explain it too much….
Function IP
{
param ($ipadress = $(Read-host "Enter IP address"))
$rule = "YOUR PREVIOUSLY CREATED RULE NAME"
Write-host "Adding address :" $ipadress -foregroundcolor "Red"
Start-sleep -s 5
netsh advfirewall firewall set rule name="$rule" new remoteip="$ipadress" action="allow"
}
IP
Only thing you have to do in the script is to enter your fireall rule name.
When you start the script, it will ask you to enter desired ip address, and press enter. After that, wait 5 seconds and thats it
Cheers!
Powershell?
Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation. Windows PowerShell is easy to adopt, learn, and use, because it works with your existing IT infrastructure and existing script investments, and because it runs on Windows XP, Windows Vista, and Windows Server 2003. Windows PowerShell is now included as part of Windows Server 2008 and can be evaluated in Windows Server 2008 Beta 3. Exchange Server 2007, System Center Operations Manager 2007, System Center Data Protection Manager V2, and System Center Virtual Machine Manager also leverage Windows PowerShell to improve administrator control, efficiency, and productivity.