txgeekgirl1
Programmer
I had a program written in VBA which called a PowerShell script to create Exch2010 mailbox accounts for new users. Worked fabulous with Access 2003. We moved our Databases to a newer server with Access 2010 on it. I have checked reference libraries and anything pertaining to the code - everything looks good. I then consulted the Microsoft boards for calling a PS Script from Access2010 but their solution does not work. If anyone has any suggestions or solutions - much appreciated!
Access 2003 code that worked:
Access 2010 suggestion - does not work:
The actual code in the file does run and work from the new server - so I just need to get the Call fixed.
Access 2003 code that worked:
Code:
'Call Powershell and run connection
Call Shell("powershell -file ""c:\scripts\NewMailbox.ps1""", vbMaximizedFocus)
Access 2010 suggestion - does not work:
Code:
'Call Powershell and run connection
Call Shell("C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -command c:\scripts\NewMailbox.ps1", vbMaximizedFocus)
The actual code in the file does run and work from the new server - so I just need to get the Call fixed.