Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Const JOIN_DOMAIN = 1 Const ACCT_CREATE = 2 Dim sCmpName Dim sUser, sPassword, sDomain, sOU sUser = "domain\username" sPassword = "XXXXXXX" sDomain = "domain" sCmpName = InputBox("Enter the new computer name:", "Computer Name") If sCmpName = "" Then Wscript.Echo "Exiting script." Wscript.Quit End If Dim oWMI, oCmp, oOS, sReturn Set oWMI = GetObject("winmgmts:\\.\root\cimv2") For Each oCmp in oWMI.InstancesOf("Win32_ComputerSystem") sReturn = oCmp.Rename(sCmpName) If sReturn <> 0 Then Wscript.Echo "Rename failed. Error = " & Err.Number & _ vbcrlf & "Exiting script." Else Wscript.Echo "Rename successful." sReturn = oCmp.JoinDomainOrWorkgroup(sDomain, sPassword, _ sDomain & "\" & sUser,JOIN_DOMAIN+ACCT_CREATE) If sReturn <> 0 Then Wscript.Echo "Join domain failed. Error = " & Err.Number & _ vbcrlf & "Exiting script." Else Wscript.Echo "Join domain successful." End If Wscript.Echo "Rebooting computer..." For Each oOS in oWMI.InstancesOf("Win32_OperatingSystem") sReturn = oOS.Reboot Next End If Next
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.