Hi,
I'm new to Powershell scripting and I'm currently writing my first script.
I have a problem for which I haven't found a solution even after a long search on the web.Maybe someone here can put me on the right track.
In my script I wanna start an MSAccess database, with the /wrkgrp attribute.
Unfortunately, I can't get this running with a Powershell command.
A few informations:
The command line used in a local desktop shortcut to start the Database with secure workgroup:
"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "\\SRV2013-01.db.net\DBs\Database.mdb" /wrkgrp "\\SRV2013-01.db.net\DBs\WGs\MyWorkgroup.mdw"
I can also enter this command line in the old CMD console and starting the database.
In Powershell I have already made several attempts, first with the "Invoke-Item" command:
Invoke-Item "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "\\SRV2013-01.db.net\DBs\Database.mdb" /wrkgrp "\\SRV2013-01.db.net\DBs\WGs\MyWorkgroup.mdw"
and then with the "Start-Process" command:
Start-Process "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "\\SRV2013-01.db.net\DBs\Database.mdb" /wrkgrp "\\SRV2013-01.db.net\DBs\WGs\MyWorkgroup.mdw"
So far without success.
As an alternative I used the following command that use the old CMD console.
This works, but I would like to change this code line to a "clean" Powershell command, without using the old CMD console command.
CMD /c "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "\\SRV2013-01.db.net\DBs\Database.mdb" /wrkgrp "\\SRV2013-01.db.net\DBs\WGs\MyWorkgroup.mdw"
I hope I was able to describe my concern clearly and now I hope for an interesting exchange.
Many Thanks