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.
Locked
User avatar
bareedaa
Posts: 5
Joined: Mon May 20, 2013 12:55 pm

Calling Powershell Scripts Via VB

Post by bareedaa » Mon May 20, 2013 8:40 pm

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' |
ForEach{
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???

User avatar
jvierra
Posts: 13302
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Calling Powershell Scripts Via VB

Post by jvierra » Tue May 21, 2013 3:56 am

That cmdlet is only avaialbe for PowerShell.

User avatar
Alexander Riedel
Posts: 6837
Joined: Tue May 29, 2007 4:43 pm

Re: Calling Powershell Scripts Via VB

Post by Alexander Riedel » Tue May 21, 2013 9:48 am

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.

Locked