Skip to main content
4 votes

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

PowerShell Get-ADUser -Identity SamAccountName returns the user object for SamAccountName. To get the enabled property, use: Get-ADUser -Identity SamAccountName | Select-Property Enabled. ...
Jeter-work's user avatar
3 votes
Accepted

Keep using IE11 functionality after expiry

Internet Explorer will be disabled in Windows on June 15 2022, so you technically will not be able to start Internet Explorer after this date in Windows 10 20H2+ (starting iexplore.exe will open Edge ...
Swisstone's user avatar
  • 6,915
3 votes
Accepted

Shutdown domain PC's in bulk ASYNCHRONOUSLY

You could use a Powershell Workflow... #Requires –Modules PSWorkflow workflow Shutdown-PCs { $computers = 'computer01','computer02','computer03','computer04' Foreach -parallel ($computer in $...
Mike1980's user avatar
  • 1,018
3 votes

How can I get an OID for a certificate template?

I had trouble with finding the distinguished name for a certificate template, so I found a different way than the other answers by following these steps: Open MMC and add the Certificate Templates ...
chillNZ's user avatar
  • 31
2 votes

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

I looked for so long too. I figured out the answer! To check the current state : auditpol /get /subcategory:"Process Creation" This next line will make the change. It will set the process creation ...
OatBoat's user avatar
  • 21
2 votes

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

I can't comment yet, but I agree with Ryan Boldger. I did find someone who wrote a module to do just this, but it's quite old. Here's the link if you want to look: https://stackoverflow.com/...
Scott Heath's user avatar
2 votes

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

You can accomplish this with the -RunLevel Highest flag for New-ScheduledTaskPrincipal in PowerShell. Example: # Set the scheduled task time and repitition $TaskTime = New-ScheduledTaskTrigger -Daily -...
Josh Zhang's user avatar
  • 169
2 votes

vbs to detect usb drive and run some commands

VBScript: please read Rob Haupt's five VBScript 'best practices' and Rob van der Woude's Debugging Your Scripts; in short: use Option Explicit statement always (if used, the Option Explicit statement ...
JosefZ's user avatar
  • 1,584
2 votes
Accepted

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

It seems I missed a *. The correct code is: dsquery * -Filter "(userAccountControl:1.2.840.113556.1.4.803:=2)"
DSKyo's user avatar
  • 153
1 vote

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

I was able to fix this by importing the certificate via the Internet Options / Content / Certificates interface, into the following three stores: Personal, Trusted Publishers, Trusted Root ...
mcrawf's user avatar
  • 11
1 vote
Accepted

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

Sorry, I'm not a big expert here, but will still try to add my 5 cents... First of all, have you tried self-signed certificate? It is easier to debug, will help you test locally. https://social....
Alex's user avatar
  • 186
1 vote

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

Try this: dsget group <group DN> -members -expand > Group_Members.txt The created document now contains the DN of each member of the group. You can then use this to get more details for each ...
Ben Lavender's user avatar
1 vote

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

You can use Backup-DbaDatabase cmdlet from dbatools, you just need to install the module first and then set the -SqlCredential parameter with the username and password. Lots of examples out there.
Peter Hahndorf's user avatar
1 vote
Accepted

Logon VBS script will not start programs

As Pimp Juice IT pointed out, I can also do this in User Configuration | Admin Templates | System | Logon | Run these programs at user logon. To get past the "Do you want to run this script" ...
Canadian Luke's user avatar
1 vote

Get list of Outlook Favorite Item via Powershell

I found a similar thread for your reference: Get list of Outlook Favorite Item via Powershell The script to fix your problem is similar with jfrmilner's: $OutlookObject=New-Object -ComObject Outlook....
Ivan_Wang's user avatar
  • 1,339
1 vote
Accepted

Get list of Outlook Favorite Item via Powershell

This code will list Favorites $ol = New-Object -ComObject Outlook.Application $ex = $ol.Application.ActiveExplorer() $mm = $ex.NavigationPane.Modules.GetNavigationModule(0) $favorites = $mm....
jfrmilner's user avatar
  • 486
1 vote

How to find vbscripts running on Windows Servers

I don't know if my old vbscript can help you in your case or not : So this vbscript will generate an Excel file as report where you will find many useful informations like : All Tasks, No Microsoft ...
Hackoo's user avatar
  • 115
1 vote

How to find vbscripts running on Windows Servers

I'd search for scheduled tasks that run scripts, and if you have AV or FSRM on the servers, I'd set it up to log when the scripting host runs, or a vbs/wsf file is opened.
Chris's user avatar
  • 955
1 vote

logon script applied but not running

Try writing a file instead of echoing to a console. Depending on how things are set up, it could be running in a hidden session you never see, or just finishing so quick and then closing you miss it. ...
Joel Coel's user avatar
  • 13k
1 vote

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

Looks to me like you're just running into trouble translating the VBS code into powershell. There are some subtle syntactic differences such as: $WSH = New-Object -Com wscript.shell $WSH.run("...
Colyn1337's user avatar
  • 2,427
1 vote

Add printer VBS Script SWbemObjectEx Access denied

Is this a user or machine GPO Policy? I would suspect if it is user that the actual user might not have permissions to add the printer. You could try to follow this guide from MSDN's blog to give the ...
PHELMS's user avatar
  • 92
1 vote
Accepted

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

All occurrences of MID function in your code follow syntax pattern Mid(string, start[, length]) properly: Arguments string String expression from which characters are returned. If string ...
JosefZ's user avatar
  • 1,584
1 vote

RUN exe file with a script on Windows 7 32bit

Try placing the end quote differently: "C:\Program Files\Google\Chrome\Application\chrome.exe" --kiosk-printing
Jeff's user avatar
  • 236
1 vote

Retrieve user details from Active Directory using SID

All the Powershell Answers are obsolete/incomplete. The native AD Powershell Command would be: Get-ADUser -Identity S-1-5-21-3968247570-3627839482-368725868-1110 You can of course generalize/extend ...

Only top scored, non community-wiki answers of a minimum length are eligible