3 Replies Latest reply on Mar 15, 2011 7:43 PM by hriz

    how to change Computer Name using Landesk?

    Rookie

      i have 1 more question, can we change Computer Name using Landesk?

      the condition is the clients are join to a domain. but i need to change the Computer Name according to the Standard Naming in company. without disturbing the end users.

       

      if any one know, please send me the steps. i'm in LDMS 9.

       

      Thanks.

        • 1. Re: how to change Computer Name using Landesk?
          1EarEngineer Specialist

          haven't found a way to do it via landesk but here is a simple vb we made here that works great and the user never knows. Changes name on Reboot, which you can do then when you rename it or tell it not to reboot. Simply edit the part to fit your info

           

          'On Error Resume Next

          'open the file system object
          Set oFSO = CreateObject("Scripting.FileSystemObject")
          set WSHShell = wscript.createObject("wscript.shell")

          Dim sNewCname     'Variable to hold Computer Name you enter in the inputbox
          Dim sOldCname        'computers current name

          'First param is message text, second is message title
          sOldCname = InputBox("Enter computers current name","Windows 2k3 Netdom Rename Script")
          sNewCname = InputBox("Enter computers new name","Windows 2k3 Netdom Rename Script")

          Call WSHShell.Run("cmd.exe /K netdom renamecomputer " & sOldCname & " /newname:" & sNewCname & " /userd:YourDomainhere\ADMINISTRATOR /passwordd:YourPasswordhere/usero:YourDomainhere\ADMINISTRATOR /passwordo:YourPasswordHere/force ")

          On Error Resume Next
          mname = InputBox("Enter Machine Name or IP Address to ReBoot", "Reboot Machine")
          If Len(mname) = 0 Then Wscript.Quit

          if Msgbox("Are you sure you want to reboot machine " & mname, vbYesNo, "Reboot Machine") = vbYes then

                  Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" & mname).ExecQuery("select * from Win32_OperatingSystem where Primary=true")
                  for each OpSys in OpSysSet
                      OpSys.Reboot()
                   next
          end if

          1 of 1 people found this helpful
          • 2. Re: how to change Computer Name using Landesk?
            Specialist
            1 of 1 people found this helpful
            • 3. Re: how to change Computer Name using Landesk?
              Rookie

              Thanks for your information Gru and Aspen.. i'm still running on it..