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.

Filter by
Sorted by
Tagged with
0 votes
2 answers
6k views

Script to enable bitlocker in All Drive

I am trying to enable bitlocker in all domain joined user machines in my office. I have used a Widows task scheduler script to enable bitlocker in all machines. But the below code is enabling ...
0 votes
2 answers
7k views

how can I hide the cmd window when running a VBScript scheduled task on Win 2003 R2 SP2 x64?

I am running a VBScript (.vbs) file via Windows Scheduled Task. On a Windows XP SP3 x86 machine, a command window is not shown when the task executes. On a Windows Server 2003 R2 SP2 x64 machine, a ...
0 votes
1 answer
7k views

Automatic profile configuration in Outlook 2016 / Outlook 365

I'm in the process of reconfiguring Outlook 2016 clients with an Exchange 365 backend. The majority of my users need access to one or more shared mailboxes to receive and to send e-mail. Using the ...
0 votes
0 answers
137 views

How to assign filtered column data to a variable using Set in VBA excel?

I am newbie to VBA excel. I am trying to use Set to assign some data from a filtered column (through AutoFilter) to a variable (X in this case). Below shows the code and image of the table. Sub Test() ...
14 votes
5 answers
136k views

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 ...
1 vote
2 answers
17k views

Task Scheduler not able to execute .vbs scripts successfully

Apologies if this has a really obvious answer! We have several daily tasks we run via a .vbs script on our server (through the Task Scheduler), and for months it has been fine, but recently we've hit ...
1 vote
1 answer
785 views

FTP upload vb script : files are not overwriting

I am passing value as 16 but its not working for me, my files are not overwriting and even getting popup also, Is there any work around ? I checked with as 20 value also but not working. Const ...
1 vote
0 answers
890 views

GPO VBS Script does not run at startup

I need to setup a GPO that execute a VBS script at Startup. I already create a script and test it without GPO and works perfectly, but when I do gpupdate /force and restart computer, nothing changes. ...
0 votes
1 answer
1k views

Disable "Windows Firewall with Advanced Security" for all profiles(Domain,Public,Standard) in local GP using script help! Windows 7 Clients

We need Windows7 with windows firewall to be turned off , so the GOLD image has windows firewall turned off for all profiles(Domain,Public,Standard) and Windows Service disabled No the same GOLD ...
1 vote
2 answers
1k views

How Can I Open and Print a Word Document Using a VBScript Called From the Web?

The university I work for allows students to register their bikes for indoor storage during the winter. This is done through a website. At the end of the process, a DYMO label printer connected to the ...
0 votes
1 answer
2k views

Scheduled Task fails to stop

I have a Scheduled Task on a Windows (64-bit) 2008 R12 (SP1) server. It’s a housekeeping task and I was expecting its first run to take some time catching up on backlog of actions , so set what I ...
2 votes
2 answers
8k views

How do I fix "No usable signing certificates are available" in VBA?

We have a VBA script in Outlook that generates a popup when sending external emails. Apparently the script's signature expired over the weekend. The person who signed it is no longer here. I see ...
1 vote
0 answers
94 views

How can I get Airflow on Linux run a VBS script that is automatically downloading SAP data?

I have an Airflow installed on CentOS and I am able to run scripts/commando's on my Windows 10 machine. However, I have a VBS script that starts Excel and SAP Logon and then automatically logins, ...
2 votes
1 answer
4k views

Remote installing an msi on citrix servers using WMI

OK, I'm a C# programmer that is trying to streamline the deployment of a custom windows form app I inherited and built an installer for with WiX (this app will need to be reinstalled regularly as I'm ...
1 vote
3 answers
25k views

How to get a list of Domain Admin users from a windows 2003 DC

I'm trying to get a list of domain admin users from my Windows Server 2003 domain controller. I am unable to obtain it with powershell because the ActiveDirectory module is not installed. I need to ...
0 votes
1 answer
3k views

How to select using script on Task Scheduler the "run with highest privileges"

Hi I'm doing some scripting to add a task on a Task Scheduler. However I need to have a script to select the "run with highest privileges". Sample code: Dim settings Set settings = ...
-4 votes
1 answer
305 views

Keep using IE11 functionality after expiry [closed]

I am trying to understand how to keep using a legacy intranet "web application" based on VBScript (a scripting language supported by IE11, a still supported product, at the moment of writing)...
2 votes
2 answers
65k views

Scripting help - need to get phone number of AD accounts and then add them to contacts in trusted domain

I have domain accounts that I have created as contacts in another trusted domain so that they can see them in their Exchange GAL. I need a way to extract the phone number field from UserA (user ...
0 votes
1 answer
2k views

How to prevent schtasks on Windows 7 from showing the command prompt after executing a task?

I am trying to get a scheduled task on Windows 7 to execute once a minute, using schtasks and a batch file. My .bat batch file is: @ECHO OFF wscript "c:\http.vbs" The .vbs script si a simple one, ...
-1 votes
2 answers
114 views

Permissions not applied to folder on Brazilian machine, how to fix that?

I am applying permissions to a folder using RunWait by icacls. It is working correctly on windows 10 64bit English machine. But when I ran on the Brazilian machine, it is not applying. So ran the ...
1 vote
1 answer
587 views

Any PowerShell Script to Backup and restore Ms-sql database using dB username and password?

I am looking for a PowerShell script which can take backup and restore MS-SQL databases using SQL authentication.
0 votes
1 answer
523 views

How to connect to PostgreSql database in docker (linux) container from windows desktop via vbscript

I face the following error in trying to connect to PostgreSql database in (linux) docker container from windows desktop via vbscript: Microsoft OLE DB Provider for ODBC Drivers (30, 11) : FATAL: ...
3 votes
1 answer
1k views

Logon VBS script will not start programs

I am trying to have Group Policy run a Logon script for a User OU. The script runs, but the part where it creates a Shell Object to run, it does not load during logon. If I double-click the script, it ...
0 votes
2 answers
457 views

Get list of Outlook Favorite Item via Powershell

Hy Guys, I Trying Get list of Outlook Favorite Item via Powershell, but i couldn't, I have created the script for Inbox and others, it's working, but having trouble with favorite item, can anyone help ...
1 vote
2 answers
164 views

How to find vbscripts running on Windows Servers

This is a question for a managed services provider managing thousands of windows 2012-2016 servers. The August 2019 Microsoft patch purports to break many (all?) VB scripts. I've got the ability ...
0 votes
0 answers
100 views

In Windows Server 2016 is there a way to run a scheduled task, via windows script, as an admin, using credentials incl. pwd?

Ok first, yes, I know this will be looked at as a security risk. The plan is to code this into an .exe; the pwd changes annually so there is very little hassle in changing the source code and re-...
5 votes
2 answers
9k views

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 ...
0 votes
2 answers
3k views

VB script + run CMD and display network address by using SendKeys

I use the following VB script ( example ) , to open CMD window and run ipconfig on my WIN XP CMD window was opened but from some reason WshShell.SendKeys not send the ipconfig on CMD window please ...
1 vote
1 answer
325 views

Using Vbscript/PowerShell How to check if an AD user account has permissions to modify AD group membership?

I have a custom Operating System deployment solution (OSD Upgrade) which as part of the process has to first modify a few associated AD group memberships using the user account of the person who ...
2 votes
1 answer
2k views

Download large files via VBscript

Has anyone been successful with downloading large files via VBScript? My script is below and it is erroring out downloading a file over a 1GB. Small files it works with no problem. Do I need to try ...
4 votes
1 answer
2k views

"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 ...
2 votes
1 answer
9k views

logon script applied but not running

Using this answer, I was able to confirm that a logon script is applied to my user account, but it doesn't run. I can run gpupdate /force but my PC got accounts connected to a different domain and I ...
0 votes
0 answers
488 views

Granting permission to domain user for folder not working

I'm converting my code to use icacls and currently following this tutorial: https://ss64.com/nt/icacls.html. On this part, Grant the user jdoe rights to create, edit and delete files in the ...
17 votes
3 answers
44k views

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 ...
1 vote
2 answers
2k views

Building .htm email signatures with PHP or script and Active Directory

We use HTML signatures which are based off a template which gets changed from time to time. At the moment i have to open all the html files stored on the server into dreamweaver or similar, make the ...
1 vote
2 answers
1k views

iis vbscript remove all site bindings and replace with list of new bindings

I have a single host with 500+ bindings associated to it, and I would like to first purge this host of all its bindings and replace them from a list of bindings in a file. The format of the fill will ...
0 votes
1 answer
1k views

VBS Script passing argument?

Hello everyone I have this script in VBS: On Error Resume Next If WScript.Arguments.Count < 2 Then WScript.Echo "This script requires arguments." WScript.Quit End If Dim sURL, ...
7 votes
3 answers
23k views

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 ...
5 votes
5 answers
47k views

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....
1 vote
1 answer
2k views

A positional parameter cannot be found that accepts argument 'WScript.CreateObject'

Trying to execute: Set objWshShell = CreateObject("WScript.Shell") Getting error: [![PS C:\Windows\system32> Set objWshShell = WScript.CreateObject("WScript.Shell") Set-Variable : A positional ...
2 votes
3 answers
12k views

Can multiple computers simultaneously append to a file on a windows file share?

I'm trying to log certain information from my network of Windows machines; I've set them to periodically collect this info, then I want it in a single CSV file on a network drive. I'm using a VBS to ...
1 vote
3 answers
45k views

running vbscript with psexec?

Is it possible to run a vbscript remotely with psexec? Normally the field of psexec calls for an exe file, so can this be changed or manipulated to deal with a vbs file?
0 votes
1 answer
690 views

How to Read XML and Generate SQL Insert for Call Data Records

I am trying to write a VB Script to read a XML file (downloaded daily) and insert the information into a MSSQL DB. The content of the XML is a list of CDRs (Call Data Records). I need to parse the ...
2 votes
2 answers
10k views

How to run a 32-bit app from VBScript on both 32-bit & 64-bit Windows?

What is the best way to invoke a 32-bit command with Shell.Run in VBScript such that it will succeed on both Windows 32-bit and 64-bit operating systems? On 64-bit, the app terminates because it's ...
1 vote
1 answer
1k views

Add printer VBS Script SWbemObjectEx Access denied

The script runs fine when run as admin on the local computer, but when deployed via GPO as a startup script gets 'access denied' from SWbemObjectEx.put_. Here's the whole script: strComputer = "." ...
3 votes
4 answers
26k views

Windows Server 2008 R2 VBScript script engine missing

On Win2008R2 x64 I get Input Error: There is no script engine for file extension ".vbs". when starting a .vbs file.
3 votes
1 answer
16k views

Overwrite files without prompt with File.CopyHere in logon script (vbs)

I'm trying to create a logon script (vbs) to install some fonts. If the fonts are installed I get a prompt saying "There's already a file with the same name in this location". How can I force the ...
-1 votes
1 answer
3k views

VBScript MID function - Invalid procedure call or argument - Code 800A0005

I've created a VBScript that aims to change folder share names on a server. This is currently running as a logon script for my test users. I've defined this function: Private Function ...
2 votes
2 answers
34k views

How to check if a specific list of user accounts are disabled in AD, using powershell v2.0 or CMD / VBS

1) I have a txt list with sAMAaccountNames 2) I need to query each account name and verify whether it is disabled 3) if the account is disabled, delete it from AD I'll just delete them manually if ...
0 votes
0 answers
278 views

Export Windows Registry for Services

I have a process that I want to automate, I have tried doing some digging but I can't find a way to do it, as I am not a heavy scripter. Here it goes: I want to have a script of some sort, that will ...

1
2 3 4 5