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.
This topic is 10 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
bareedaa
Posts: 5
Last visit: Sun Jun 09, 2013 10:24 am

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' |
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???
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Calling Powershell Scripts Via VB

Post by jvierra »

That cmdlet is only avaialbe for PowerShell.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 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.
This topic is 10 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked