Questions tagged [vbscript]

VBScript is a general-purpose scripting language developed by Microsoft that is modeled on Visual Basic. It is commonly used for Windows system administration. Some applications may use it as an internal scripting language allowing application automation.

216 questions
15
votes
3 answers

How can I edit local security policy from a batch file?

I am trying to write a utility as a batch file that, among other things, adds a user to the "Deny logon locally" local security policy. This batch file will be used on hundreds of independent computers (not on a domain and aren't even on the same…
Stephen Jennings
  • 1,383
  • 3
  • 23
  • 30
11
votes
4 answers

Retrieve user details from Active Directory using SID

How can I find a user in my AD when I have his/her SID. I don't want to rely on other attributes, since I am trying to detect changes to these. Example: I get a message about a change to user record containing: Message: User Account Changed: …
er4z0r
  • 151
  • 1
  • 1
  • 6
7
votes
3 answers

How can I get an OID for a certificate template?

I'm using C# (or VBScript) to issue a certificate from an Enterprise CA. According to this answer, I need to specify the OID instead of the certificate name, and place it in an unexpected portion of code. (IMHO I should place it where the null…
6
votes
5 answers

Script to kill process at logoff doesn't execute until process is dead?

We have a program that, due to memory leaks in some of the screens, doesn't exit cleanly when the user quits. The problem is that this blocks the normal logoff procedure - you select logout and a few processes disappear but the user doesn't…
robertc
  • 408
  • 1
  • 7
  • 14
5
votes
5 answers

Why won't my logon scripts map drives under Windows 7?

Why won't my logon scripts map drives under Windows 7? I'm using a VBScript script similar to the one below. The script runs using a group policy. Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") WshNetwork.MapNetworkDrive…
Steven
  • 349
  • 4
  • 8
  • 17
5
votes
2 answers

How to query the task manager

I know the tasklist command in Windows will give a list of task names and their PID. There is another command WMIC path win32_process get Commandline which does give more detailed information, but its output is much messier and sometimes…
E.S.
  • 155
  • 1
  • 5
5
votes
5 answers

Please help me add to this script to get server hardware info

(If this should be on stackoverflow just tell me...but it seemed more fitting here) I found the script below online from this site: http://forums.webhostautomation.com/showthread.php?t=8667 Can someone please assist in adding (if possible) the…
TheCleaner
  • 32,352
  • 26
  • 126
  • 188
5
votes
1 answer

Windows Task Scheduler cannot access EFS encrypted folder despite running as a user with access

I have a batch file set to run via Task Scheduler in Windows Server 2008 R2. The batch file is being used to rotate and compress MySQL logs, and the folder containing these logs is encrypted using the Windows built in EFS encryption. I found a VBS…
5
votes
4 answers

Download file from vbscript?

I need a script that can be run on freshly installed windows xp+ and download specified files from internet, like http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi Is it any easy way to do it without hand-crafting HTTP/FTP requests or using…
grigoryvp
  • 3,415
  • 11
  • 38
  • 58
5
votes
9 answers

What scripting language do you use for your logon scripts in your Windows enviroment?

I wonder what scripting languages is most used as logon scripts these days. Is people still hacking away in batch-file files or vbscripts, or do you use PowerShell or something completely different? Personally, I have pretty good experience with…
Egil Hansen
  • 203
  • 2
  • 8
5
votes
1 answer

How do I get a list of websites from iis showing the host header value, description and home folder location?

I am using iis win2k3. How do I go about extracting an adhoc list of websites, displaying the host header value, description and web folder location? The export list only shows the header and description value. UPDATE - matt provided answer and I've…
Joe
  • 211
  • 1
  • 3
  • 7
4
votes
1 answer

Modify MDT wizard to automate computer naming

Situation: I am imaging new systems using MDT Lite-Touch. I am trying to customize the wizard to automate the naming of new systems so that they include a prefix "AG-", a department code which is selected from a drop-down box in the wizard…
Jeramy
  • 193
  • 1
  • 7
4
votes
1 answer

Using VBScript at logon to determine if powershell is installed

I have a mixture of Win7, and XP machines on my network. Every user logs on using a VBS based logon script and for clients that support it, I want to show an informational pop-up as shown here. How can I detect if Powershell is installed using…
makerofthings7
  • 8,821
  • 28
  • 115
  • 196
4
votes
1 answer

"Unknown scripting language VBScript" IIS 7.5 + 2008 R2 SP1

Migrated an old classic ASP application from Server 2008 R2 to a new Server 2008 R2 SP1 and having serious issues now. All set ups and configs are identical between the "old" and new servers, no code has changed, all I did was move it from one box…
Richard Benson
  • 228
  • 2
  • 10
4
votes
1 answer

How do I package this vbscript as a msi for Group Policy

I had a developer that is no longer with us create an msi to do this for me, but the package is outdated now and we need to deploy new files. Basically I need to do the following: Take the code at the bottom of this question and deploy it to all…
TheCleaner
  • 32,352
  • 26
  • 126
  • 188
1
2 3
14 15