Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restrict command prompt to just ping 1

Status
Not open for further replies.

gmail2

Programmer
Jun 15, 2005
987
IE
Hi All

I'm setting up a TS which I want to lock down. I don't want the users to have access to command prompt, but I do want them to be able to use ping. I know I can use software restriction policies to restrict access to cmd.exe, but unless you can launch ping from a command prompt, it's not much use

Can anybody help at all ?

Irish Poetry - Karen O'Connor
Irish Poetry and Short Stories - Doghouse Books
Garten und Landschaftsbau
 
You can always write a script/batch file (and save it as desktop shortcut) that prompts the user for the IP address and then have the script execute a ping command or you install a freeware ping tool on the server and only provide access to that.
 
Set WshShell = CreateObject("WScript.Shell")
strComputer = InputBox("Enter IP or computer name to Ping","Ping")
PingCMD = Not CBool(WshShell.run("ping -n 1 " & strComputer,0,True))
If PingCMD = True Then
MsgBox "Computer is online"
Else
MsgBox "Unable to communicate with " & strComputer
End If

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Nice one Mark, one more useful script to add to my repertory. A star for you.. cheers
 
Always happy to help.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top