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
0 answers
136 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() ...
Handsome Teh's user avatar
0 votes
0 answers
846 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. ...
Diogo Jesus's user avatar
1 vote
0 answers
91 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, ...
Billy's user avatar
  • 11
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 ...
naps1saps's user avatar
  • 192
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 = ...
John Christopher Asajar's user avatar
-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)...
Skary's user avatar
  • 97
-1 votes
2 answers
112 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 ...
uday's user avatar
  • 382
1 vote
1 answer
582 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.
san1ty's user avatar
  • 11
0 votes
1 answer
519 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: ...
M.Y.'s user avatar
  • 111
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 ...
Canadian Luke's user avatar
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 ...
Biren's user avatar
  • 31
0 votes
0 answers
97 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-...
jimo3's user avatar
  • 101
1 vote
1 answer
324 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 ...
Steve's user avatar
  • 111
1 vote
2 answers
159 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 ...
Peter Turner's user avatar
  • 2,278
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 ...
rminaj's user avatar
  • 121
0 votes
0 answers
486 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 ...
rminaj's user avatar
  • 121
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 ...
user284141's user avatar
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 ...
mokum's user avatar
  • 23
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, ...
Guizado's user avatar
  • 13
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 ...
Peter PitLock's user avatar
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 ...
Raghav's user avatar
  • 11
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 = "." ...
sdjuan's user avatar
  • 221
-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 ...
DSKyo's user avatar
  • 153
0 votes
0 answers
277 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 ...
yellowjacket21's user avatar
-1 votes
1 answer
353 views

How to delete bulk user accounts from a .txt list with VBS/PS2.0/CMD, depending on whether their accounts are disabled?

In short: - I have a .txt list of sAMAccountNames that I need to delete from AD - Before deleting the account, I need to perform a check to see whether they are disabled. If they are disabled, delete ...
DSKyo's user avatar
  • 153
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 ...
DSKyo's user avatar
  • 153
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 ...
DSKyo's user avatar
  • 153
0 votes
1 answer
168 views

Shutdown domain PC's in bulk ASYNCHRONOUSLY [closed]

I am using psshutdown to turn off list of computers, but it seems ages to shutdown a list of 50+ PC's. It's shutting down them one by one, not all of them at the same time. Is there any program or ...
Matt Markevičius's user avatar
-2 votes
1 answer
83 views

RUN exe file with a script on Windows 7 32bit [closed]

I want to run google chrome on windows 7 32bit with following target path "C:\Program Files\Google\Chrome\Application\chrome.exe --kiosk-printing" When I enter this path to Target Path field in ...
HRS's user avatar
  • 1
0 votes
2 answers
4k views

vbs to detect usb drive and run some commands [closed]

I have two scripts. Both are within the same folder on the hard disk. The "vbs" call "bat" to detect usb to run some commands. I want to incorporate the function of selecting the usb to vbs. Thanks ...
user avatar
0 votes
0 answers
163 views

Retrieve VM information from VCloud

In a development shop, we have a large number of VMs with complete installations of our applications, with client, server and database VMs in a single vApp. The people who create the VMs do not keep a ...
Mark Bertenshaw's user avatar
0 votes
3 answers
2k views

How to get all the logon time of a particular user account

I know to use event viewer to check who logged into the system and when. But I am trying to figure out for a particular local user account, say administrator - what all are the login date and time for ...
Vysakh's user avatar
  • 13
1 vote
1 answer
539 views

VBScript: Get logged on windows user instead of executing one

I need to perform a small inventory in our network. So I wrote a VBScript which I wanted to deploy with our deployment system. My problem now is: The script is executed in the context of the AD system ...
hardmod's user avatar
  • 431
1 vote
0 answers
2k views

Microsoft VBScript Runtime error: Permission denied code 800A0046

I am testing a VBScript and it was working fine earlier. Wanted to try with a different file input, but all of a sudden I'm getting Microsoft VBScript Runtime error: Permission denied code 800A0046. ...
cbll's user avatar
  • 143
0 votes
1 answer
1k views

psexec cannot run .vbs local or unc

I am trying to run a .vbscript remotely via psexec. Even with switches like -u -p -s -c, I am getting errors. Here is what I've tried: 1.) psexec -u user@domain -p password -s \\computer "\\...
Benjamin Jones's user avatar
0 votes
1 answer
790 views

Finding list of fonts for each PC

I am trying to find the best way to find a list of clearview fonts on each PC on our domain. Questions: 1.) Should I use SCCM & how? I've create a Query but I am getting nothing right now. I was ...
Benjamin Jones's user avatar
1 vote
1 answer
95 views

SCCM+ MS Office 2013 deployment

This is a 2 part question. Issue: I've created a script that executes the following scripts (in order) Officescrub10.vbs(created by microsoft), LyncRemove2010.vbs(i created), and Office2013Install....
Benjamin Jones's user avatar
0 votes
1 answer
102 views

Inventory VBScript doesn't load processor or RAM attributes

I've been working on a VBscript inspired by these posts: http://deployhappiness.com/series/creating-an-inventory-with-active-directory/ and I've found a decent amount of success in my test machines ...
nerdythor's user avatar
1 vote
1 answer
2k views

Run Bat file in Administrator Mode in Windows Server 2008

runas.exe /profile /user:administrator "C:\temp\SQLSP3.bat" will run the SQLSP3.bat file in Administrative Prompt and it is asking Adminstrator password in Windows Server 2008. SQLSP3.bat file has ...
Sudheer Muthusamy's user avatar
0 votes
1 answer
1k views

VBScript permission denied moving a folder

Help please. this is driving me nuts. Running a CMD prompt (As Administrator) on a Win2K3 AD server I have a source folder on a local disk (C:\test) I have a dest folder on a network share (\\device\...
Ian Chilvers's user avatar
1 vote
0 answers
76 views

Data Execution Prevention - Optout for the exe in “C:\Program Files\SSS\sss.exe” using Command Prompt

Can any one help me in adding "C:\Program Files\SSS\sss.exe" in DEP Exception list using Command Prompt?
Sudheer Muthusamy's user avatar
0 votes
0 answers
343 views

Run vbscript on server as scheduled task

I've written two scripts in vbs, one iterates through a bunch (+10000) of folders on our server and creates a shortcut in a specific folder to any folder that has a specific name. ('ax' followed by ...
Teebs's user avatar
  • 123
1 vote
0 answers
902 views

SCCM2012 Detection of same version package, if yes stop deploy, if no go on deployment

We have massive error on SCCM 2012 client when deploying flash 19x, since its last version has auto update ability, many of our clients has already update it before SCCM 2012 deployment. I realize ...
Colaman's user avatar
  • 19
0 votes
1 answer
318 views

set login script flag for vbs 'All Users' script so it doesn't run again

We have a vbs All Users script that creates a bunch of printers (approximately 25 printers) when a user logs on. It takes a minute or two to run so we don't want it to run again if not necessary. How ...
mindmischief's user avatar
0 votes
1 answer
302 views

VBScript- Input DisplayName Output AD Username

If I had a txt file with a bunch of names: Dan Smith Jim Bob Ryan Jones etc,etc using a VBscript could I convert the displaynames to AD Usernames? If Powershell is only options, could you please ...
Benjamin Jones's user avatar
0 votes
1 answer
4k views

Windows Registry to VBS

I have this registery (.reg) file that I use to modify screensaver properties: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\Desktop] "ScreenSaveActive"="1" "...
Maytham Fahmi's user avatar
1 vote
1 answer
10k views

How to add allowed relay IPs for Windows SMTP using command line or script

I have a long list of IP addresses I need to add as allowed relays to the built-in SMTP service on Windows Server 2008 R2 (IIS 7.5, but SMTP uses the old IIS 6.0 manager) I know how to add allowed ...
Andy Madge's user avatar
  • 1,657
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 ...
E.S.'s user avatar
  • 155
1 vote
3 answers
4k views

How do I schedule a batch file to run on startup or shutdown?

I have 2 batch files that send emails intended to notify of a server shutdown or startup. The batch files call an exe with a single argument, the message to be sent. The exe comes from a vb.net ...
Alan's user avatar
  • 1,023
1 vote
2 answers
1k views

change ip address for 10 computers based on a txt file in powershell or vbscript

I have a txt file that looks like this PC1 192.168.0.2 PC2 192.168.0.3 PC3 192.168.0.4 I would like to change computers ip addresses based on that list, so it will fill up the computer name and ...
dani's user avatar
  • 113

1
2 3 4 5