Jump to content

Gilly2003

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Gilly2003

  1. well my VB skills are back in the uni days, getting an error with the below for adding the date in: Code: Option Explicit On Error Resume Next Dim objRootDSE, objNetwork, objWMIService, objComputer Dim strComputer, strMake, strModel, strSerialNumber, strMacAddresses, strMemory, intMemory Dim colBIOS, objBIOS Dim colItems, objItem, strHDD Dim colNetworkAdapterConfiguration, objNetworkAdapterConfiguration Dim colComputerSystem, objComputerSystem Dim colPhysicalMemory, objPhysicalMemory Dim adoConnection, adoRecordset Dim myDateString strComputer = "." strMemory = "" strMake = "" strModel = "" strSerialNumber = "" strMacAddresses = "" myDateString = Date() Set objRootDSE = GetObject("LDAP://RootDSE") Set objNetwork = WScript.CreateObject("WScript.Network") Set objWMIService = GetObject("Winmgmts:\\" & strComputer & "\root\cimv2") Set colComputerSystem = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") If Not colComputerSystem Is Nothing Then For Each objComputerSystem In colComputerSystem strMake = objComputerSystem.Manufacturer strModel = objComputerSystem.Model Next End If Set colBIOS = objWMIService.ExecQuery("Select * From Win32_BIOS") If Not colBIOS Is Nothing Then For Each objBIOS in colBIOS strSerialNumber = objBIOS.SerialNumber Next End If Set colItems = objWMIService.ExecQuery("Select * From Win32_DiskDrive") If Not colItems Is Nothing Then For Each objItem in colItems strHDD = objItem.Model Next End If Set colPhysicalMemory = objWMIService.ExecQuery("Select * From Win32_PhysicalMemory") If Not colPhysicalMemory Is Nothing Then intMemory = 0 For Each objPhysicalMemory In colPhysicalMemory intMemory = intMemory + Int(objPhysicalMemory.Capacity) Next strMemory = (intMemory / 1024 / 1024 / 1024) & " GB" End If Set adoConnection = CreateObject("ADODB.Connection") adoConnection.Provider = "ADsDSOObject" adoConnection.Open "Active Directory Provider" If Err.Number <> 0 Then MsgBox "Connect Error: " & Err.Description WScript.Quit End If Set adoRecordset = adoConnection.Execute(";(&(objectCategory=Computer)(name=" & objNetwork.Computername & "));adspath;subtree") If Err.Number <> 0 Then MsgBox "Query Error: " & Err.Description WScript.Quit End If If Not adoRecordset.EOF Then Set objComputer = GetObject(adoRecordset.Fields(0).Value) objComputer.Put "description", "" &strModel & ", HDD: " & strHDD & ", " & strMemory & " RAM" & ", Serial: " & strSerialNumber & ", Date: " myDateString objComputer.SetInfo End If If Err.Number <> 0 Then MsgBox "Write Error: " & Err.Description WScript.Quit End If
  2. Great, thanks sted. yeah thought that might be the case for the last logged in user. I think date is a better one to add in as give's an indication on whether the machine is actually active on domain (some sloppy work in the business before I started) It should just be a case of adding varibaled and output in to linkazoid script?
  3. thanks guys linkazoid your script works when ran locally althought it would prefer it to display the last logged in user as well (not sure if thats easy to add in?) sted thanks also, this is the copy i was using. I have a feeling I have not set the delegation correctly, any of you have a guide handy or could bulletpoint it for me?
  4. Yeah that could be my problem, just not giving it time to replicate lol although it has been on the OU for a good few hours now... Ill give it a go again tomorrow, if not would be nice to have a look at your version of the script linkazoid? I also have it outputting to a csv on the domain controller and that is not there, will give it more time and if not there by tomorrow we know its most likely the permissions or way I have set it up!
  5. Hi guys, Im just in the testing phase of implemented steds script to populate computer AD descriptions, however I have ran in to an issue. I have created a test OU, placed a single computer in it and placed the scripts as a GPO for windows startup BUT I am not getting anywhere with it and seeing as my experience is lacking in this I am unsure as to whether I have set it up right even!!! I delegated control of read and write descriptions to "domain computers" and "domain users" Any help?
  6. Hi guys, Sorry if this is in the wrong section of the forum, new to edugeeks. I am having an issue with RealVNC, I was under the impressions when you saved a connection and then doubled clicked on it in the near future it would open that connection back up at the login (if you have a password set) just like UltraVNC However, with my RealVNC, once you click on the saved connection it opens the viewer at the last host name you were on not on the connection it is for. Does anyone know why this is? I am used to UltraVNC where when you saved the connection, you could simply click back on that connection and it would open. Is this simply a feature RealVNC doesn't have.
  7. Hi all, Need some advice on deployment server options, in the past I have only used SCCM which I found to lack at times and Altiris which I loved. however I am open to others to try or even free deployment servers if they exist lol Thanks for replies in advance
×
×
  • Create New...