The overall goal of this script is to hit all the servers, and if the description field does not contain the S/N, then it will put it there. BUT if it sees it is already there anywhere, it is to skip on to the next server. For starters I'm just gathering info & echoing to test the logic. Then...
I need to dump the names of all groups in my AD that have no members into a TXT file. I have looked for a few days now, certain that somebody had already done this, but no joy on the plagurism attempt. Close, but not what I'm looking for. Here's something close:
On Error Resume Next
Const...
The "TerminalServicesProfilePath" property has only ever been accessible via VBS running on a Windows 2003 server, as far as I know. Is this true?
I never saw it as a problem, until I got my new vista machine. I thought it would be a 'from here forward' it will work kind of thing, but Vista's...
OK,this should be simple, but it seems not to work.
err.clear
Set objUser = objOU.Create("User", "cn=" & strCommon & "")
If err.number = 0 then
I'd hoped err.number would be 0 if the user created without issue, or some other number if the create failed for whatever reason (duplicate, illegal...
I have what ought to be a pretty simple trap. It either worked (0), or didn't (any non-zero).
But I'm seeing users on my incoming list with invalid names (smith, Jr.) that should and do fail to create. But when they fail to create, they also fail to set err.number at something else than 0...
I first started on SMS 2003, and have dealt with the product since before Sp1. But I've never seen/loaded/used SMS 2.0 (and I've heard I'm lucky for that).
Anyhow, the company I work at now has been kind enough to assign me to manage the SMS 2003 product. So at a recent security audit, I'm...
'###########################
' Rename Computer
'###########################
rc = objWMIComputerSystem.Rename(strNewComputer, _
strDomainPasswd, _
strDomainUser)
I'm re-naming a machine, which works fine as above. Company Policy prohibits storing passwords & usernames in the script.
When...
We have just finished SMS 2003 SP3 rollout. I've been tasked with creating a package that will be delivered to computers as they are made members of an AD group. Thus, I need to update a collection via a rule like 'all computers in this AD group'. I believe my first hurdle is that the groups...
All,
As the subject indicates, I need to move a secondary site to another server. It has no SQL, just CAP, DP, and MP. If I do an SMS site backup task, can I then install on a box with a diferent name, and use the recovery wizard to restore the settings? Or is it just as easy to go ahead and...
I tried to search this forum for 'Java Server Pages', but search is down. I did browse the first 480 entries, but didn't see anything promising.
Anyhow, since having the same issue with ASP originally, I'm figuring I need to add an extension. I'm trying to work through the wizard, but I've no...
How hard can it be, right? The more I learn, the more I learn I need to learn.
I wrote this script to parse all shares in AD, and report 'everyone' groups ACL (if present) at each NTFS share root folder. It actually works pretty good, but I'm unhappy with one thing. The IPC$ share has no...
I need to get services "where startname = 'domain\user'"
Here's what I'm working with:
OldUser = "domain\user"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & Computer & "\root\cimv2")
If Err.Number <> 0 Then
Wscript.Echo Computer & " is not...
I'm needing help automating some downloads, and I can't seem to get IE to tell me whether the requested path is valid. I'm adding one to our current definition value, and checking for the presence of the file on the website with:
On error resume next
set x =...
I am trying to automate the display and subsequent closing of multiple bitmaps. I can accomplish by automating word as follows:
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objShape =...
I have a script that deletes computers that works most of the time, but not all of the time:
'***************************************************
'* Connect to the Domain *
'***************************************************
Set DomainObj = GetObject("WinNT://" &...
I've looked around for a few hours, but can't find examples of just opening, sorting, & saving.
OK, I've parsed huge txt logfiles, and extracted relevant data to a CSV - User,Computer,Timestamp. I.E.
UserA,Computer1,Mon Nov 22 2004
UserA,Computer1,Mon Nov 22 2004
UserB,Computer2,Mon Nov 22...
I am needing to scan dumped event logs daily at 1 A.M. from the previous day. MS has a utility 'eventcombMT' that performs this work based on saved parameters. Here in lies the trouble I'm having. The parameters are saved to/read from HKCU\Software\Microsoft\EventCombMT registry key. I have...
I have a TXT file list of computers to disable or delete. I can delete with:
Set DomainObj = GetObject("WinNT://" & "DomainNameString")
DomainObj.Delete "computer", "ComputerNameString"
I've seen code which is supposed to disable, but it uses GetObject("LDAP://" CN=, OU=, OU=, etc), which I...
Can this be done?
I have 3 scripts, .VBS files. The first builds an HTML page and a working file. The other 2 take the working file and perform actions. I need code on the HTML that invokes the other 2 VBS files.
objPendRpt.writeline "<INPUT TYPE=BUTTON OnClick=" & Chr(34) & "discomp.vbs"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.