Calling Powershell Scripts Via VB

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 5
Joined: Mon May 20, 2013 12:55 pm

Calling Powershell Scripts Via VB

Post by bareedaa »

I would like to call the following powershell scripts in to VB:

Get-ADUser -Filter {Enabled -eq $false} -Searchbase 'ou=Q1,Dc=demo,DC=corp' |
Set-MailboxAutoReplyConfiguration -Identity $_ `
-AutoReplyState Enabled `
-ExternalAudience All `
-InternalMessage 'Your message to internal users' `
-ExternalMessage 'Your message to external users'

The task is to create: VBScript ; tht Enable AUTO Out-Of-Office (OOO) message for disabled active directory users that own a mailbox in case the employee is terminated or quits.
Please help???

Posts: 14691
Joined: Tue May 22, 2007 9:57 am
Answers: 7
Has voted: 2 times
Been upvoted: 5 times

Re: Calling Powershell Scripts Via VB

Post by jvierra »

That cmdlet is only avaialbe for PowerShell.

User avatar
Alexander Riedel
Posts: 7596
Joined: Tue May 29, 2007 4:43 pm
Answers: 2
Been upvoted: 6 times

Re: Calling Powershell Scripts Via VB

Post by Alexander Riedel »

You can use our free AciveXPosh component to call PowerShell from VBScript.
It is available in the downloads section of our site.
Alexander Riedel
SAPIEN Technologies, Inc.