can I add telnet function in a viso document

D

Dennis Cox

I have made a viso document of our network servers. Can I add the
functionality of telnet or RDP on each server if I right click on it?

Also would love to know how I can automate gathering server configs and pull
them into visio if anyone has a cheap ( read FREE ) way of doing it.
 
A

Al Edlund

assuming you have a custom property with an ip address assigned to the shape
you can do the telnet with a hyperlink and the rdp with a macro. For the
rest of it you can do it with some vba code based on examples available in
the msdn scripting library that uses wmi.

al


put something like this in the hyperlink address

"""TELNET:""&Prop.Ipaddress"




the macro looks something like this

' We may want to work with something that supports terminal services
' For a macro version should redefine to use single selected object
Public sub TermServeToTarget(byval visShape as visio.shape)

Dim visCell As Visio.Cell
Dim wsh ' create a variable for the script shell
Dim strCommand as string

' build the command preface
strCommand = ""c:\windows\system32\mstsc.exe /v:"
' check for custom property, if there get ip address if not get out
if visShape.CellExists("prop.IpAddress",False) then
Set visCell = visShape.Cells("prop.IpAddress")
strCommand = strCommand & visCell.Value
strCommand = strCommand & " /console"
else

Msgbox"counldn't find custom property"
exit sub
end if

' create the script shell environment
Set wsh = CreateObject("wscript.shell")

' now execute the command that we built
wsh.Run (strCommand)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top