Jump to content


Veerla

Established Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Veerla's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Dim strSN '************************************************************************************************************************************************ Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colBattery = objWMIService.ExecQuery("SELECT * FROM Win32_Battery") '************************************************************************************************************************************************ Set objNetwork = CreateObject("WScript.Network") strComputer = objNetwork.ComputerName Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") '************************************************************************************************************************************************ 'Part 1 – Acquire serial/service tag number Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure") For Each objSMBIOS in colSMBIOS strSN = objSMBIOS.SerialNumber ' Is this a Desktop or a Laptop If colBattery.Count = 1 Then ' Is a Laptop strSN = "LPT" & strSN Else ' Is a Desktop strSN = "DSK" & strSN End If If strSN <> "" Then exit For Next '************************************************************************************************************************************************ Set objWMIService = GetObject ("winmgmts:" & "!\\" & strComputer & "\root\cimv2") Set colAdapters = objWMIService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True") Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _ strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & _ strComputer & "'") strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colComputers = objWMIService.ExecQuery _ ("Select * from Win32_ComputerSystem") For Each objComputer in colComputers ErrCode = objComputer.Rename(strSN) Next I got this scenario worked 90%, but I am getting a small error when i am using the above script. the script is not giving me the battery information in the logic I am using... if I am running the script manually on the OS it is working fine. but when I am doing OSD it is not working can someone please help me if I am missing something?
  2. Here is the same case that you are telling, I dont want to use the MDT integration with SCCM. I trying for a solution only with SCCM.
  3. I am also facing the same issue. I am using SCCM 2012. The requirement for me is same, I am trying to assign the computername to the Workstations with respect to Serial number. and for example the name should appear as "ABC00000000", some text+serial number. I wrote the VBscript, this gets the serial number and adds the number to the text and then assigns the computer name to the workstation. The script is working like a Champ when I am testing manually. But I am missing the order to keep the script in the Task-Sequence. Please help me to get the sequence where to place exactly. I dont have the script with me right now to post it. I will post the script ASAP. Thanks All.
  4. I have lab setup with SCCM 2012. and I am trying to install client using client push installation, and also assigned one user account who is having domain admin rights. once I have initialed the client installation on one workstation, installation of Client was not initiating from the server. when I checked in CCM.log, server was not able to access \\XXXX\Admin$\ share... when I checked in my workstation, Firewall was on. then I turned off, client agent installation was success. Do we need to off the firewall everytime when we are installing the client...? do we have any other way such away that we can on the firewall on all the workstations and can be able to do our client installation withput any delay...? Please guide me if we have anyother configurations need to do from the server side to get the firewall on and as well as our client installation will pass on..... Please guide me...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.