Okay I need to come up with a real time way to check to see if a machine is connected to a very complex domain.
Currently I was thinking of using -
Set objADSystemInfo = CreateObject("ADSystemInfo")
strDomain = objADSystemInfo.DomainDNSName
wscript.Echo strDomain
The problem is this takes...
Okay thew below code works just fine but ONLY if I got to strComputer and I type in a machine name in the field E.G. my computer is named COMPUTERNAME. I type in strComputer = "COMPUTERNAME" and it runs. If I type in strComputer = "computername" or "compUternAme" or "." I get no processing once...
I have 70+ printers that were moved from server X to server Y.
E.G.
\\X\1 now is \\Y\1
\\X\2 now is \\Y\2
\\X\3 now is \\Y\3
and so fourth.
Is there any way to switch any drive mapping easily and keep the one that was the old default still the default one.
E.G. Machine 1 has has printers 1...
I need to come up with a way to determine if a user is logged into a machine or not and if the user is logged into the machine how long the machine has been in an idle state.
We have a TON of users who leave their computers up 24/7 but we have to do maintenance on machines. On the same note...
We have to setup a ton of computers all with Extranet Access Client. The entire setup is double click the setup and next next next next all the way through. Is there any switch to do this silently? The file I am working with is eac501d.exe the problem is I do a /? in there and it gives me no...
Where I used to work we had a code we punched into the phone that gave us the physical port and the extension of the phone right on the phones LCD display. Now I am in another facility and this functionality I was used to using is not there.
I am a network guy not a phone guy but attempted to...
Okay here is a simple piece of code I am playing around with I am going to tweak it ALOT but the problem I have is I can't get the binary value to output.
Dim strDate, strTime, OUTPUT_FILE_NAME, strKeyPath1, strKeyPath2
strDate = Replace(Date,"/","-")
strTime = Replace(Time,":","-")...
Someone on our network made a HUGE mistake and I am trying to fix it. I have tried ADSI and WMI with bad results I don't know if its the query I am using I tried this with ADSI -
strLocalGroup = "Power Users"
strMachineName = "Remote PC"
strDomainGroup = "Domain Group"
strDomainName =...
Okay I have over 400 imaged PC's that were actually an 2000 to XP conversion YUCK.
My boss wants me to salvage these machines to try and save the time rebuilding so many machines so I am going through them with a fine tooth comb and getting the "kinks" out.
I have them mostly fixed but then I...
I have to develop a script that does a few things.
1) I need to verify if a registry key exists and if it has the proper permissions.
2) If the permissions arent there I have to add them. This is a local group on the machine.
3) I have to check WMI and see if its working.
4) If not I have to...
Okay here is the situation I have a registry key -
HKLM\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg
this key has Admin and user rights but does not have Local Service rights.
As you may or may not know this ruins alot of remote functionality. Unable to access Event Veiwer and...
I have a master list of machine names. I then need to modify these machines in some ways, sometimes patch, sometimes change settings, basic administrative things. This leaves me with an output of the ones patched and ones not. (Its alot more complicated than that as I get a bunch of various...
I have a line such as this -
objFileOutput.WriteLine strDeviceName & "," & objSerialNumber & "," & objLoggedInUser & "
which will not write to a CSV format it gives me a syntax error. Though I can get a single variable to go by doing.
objFileOutput.WriteLine strDeviceName & ","
I also can...
I now have my WMI query for the patch setup! Now I was asked to do something I am unfamiliar with.
I have a list of Machine Names compiled from AD, I have a list of MB serial numbers.
I know WMI_Bios holds the serial number in the SerialNumber number field. Is there any way I make the query...
I guess I am still a little green with this tool.
Here is the code I am trying to use -
1)Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True...
Okay I don't get this - I am playing around with this WMI querying as I have only done VERY small simple single queries. I usually do like the below and then find the item I need and modify it and not worry about the other values. This time however I need it to report back if this value is there...
I have 2 patches for 2 different OSes,
http://support.microsoft.com/kb/928388 (for XP). And a home developed MSI for Windows 2000. I want to search these machines for these patches and if their not there to patch it at that point.
Whats the best method to user for this check? Usually I use an...
I have a couple of exes here that I am supposed to install what I want to know is how to look inside the exe to see what it contains before running it? I know you can do a system comparison when you do a snapshot before running the exe then a snapshot after but I can't install this exe as its...
Okay I know you can do something like this -
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colLoggedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where Logfile = 'Application' and " _
& "EventCode =...
How is it when I take the time variable it does not log the "real time" it just logs the time from the start of the script? I am trying to do logging and the fact the time only shows the start of the script helps me in no way when I have 5 lines and all show the exact same time.
E.G.
scripr...
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.