To make a little clearer, I want to be able to use this:

*[ps] new-variable servername -value*

But then to be prompted to enter the hostname, so I can then drop the
"servername" into the previous script.



On Fri, Aug 14, 2009 at 4:30 PM, Gavin Wilby <[email protected]> wrote:

>   Hi,
>
> I use a anti-spam system that's on a remote server, and so I like to lock
> down my Receive Connectors/ SMTP servers to only accept email from certain
> IP addresses.
>
> I have the following script that kinda does it for me:
>
>
> *[PS] C:\Windows\System32>Set-ReceiveConnector "Windows SBS Internet
> Receive %SERVERNAME%" -RemoteIPRanges (Get-Content
> c:\users\sys_adm\desktop\%youriplist%.txt)*
> its a little bit of a pain though, as I have to have the IP list in a text
> file somewhere and then modify the script to use it. and also the receive
> connector name is never the same so i have to change that in the script.
>
> Id LIKE to have it so it asks for certain variables before it starts, so it
> picks up the right hostname for instance, a little like a set /p does.
>
> Can this be done?
>
> --
> Gavin Wilby,
> Twitter: http://twitter.com/gavin_wilby
> GSXR Blog: http://www.stoof.co.uk
>
>
>
>
>
>


-- 
Gavin Wilby,
Twitter: http://twitter.com/gavin_wilby
GSXR Blog: http://www.stoof.co.uk
Sent from Whitehaven, Eng, United Kingdom

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to