Greetings
I have a quick question regarding USN, I'm a scripting newbie so I would like a little clarification on USN. I have a script which runs at Logon which populates the computer description field with the logon user and the date of logon. Now most of our users 'hotdesk' so this computer description could very well likely change on a daily basis, plus the date will change every day as well. We have around 12000 users, now reading an article on the 4sysops website it states that the USN could be exhausted within the Domain due to the levels of change within objects. Would I be putting the company I work for at risk by implementing this GPO? Last thing I would want to do is kill their Domain.
The Script I'm using is as follows:
Set
WshNetwork = WScript.CreateObject("WScript.Network")
Set objWMI =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
' My Date
myDateString = Date()
' Get computer object in AD
Set objSysInfo =
CreateObject("ADSystemInfo")
Set objComputer =
GetObject("LDAP://" & objSysInfo.ComputerName)
' Build up description field
data and save into computer object if different from current description
' We also do not update
computers with a description that starts with an underscore (_)
newDescription =
WshNetwork.UserName & " - Logged on - " & myDateString
if not
objComputer.Description = newDescription and not
left(objComputer.Description,1) = "_" then
objComputer.Description
= newDescription
objComputer.SetInfo
end if<o:p></o:p>
If there is a better way of using this script please let me know, or if I can change this in
any way to make it less more of a risk that would be great. Thanks in advance
for your suggestions.
Regards
S
- Edited by Stewart.N 22 hours 0 minutes ago