This is the post so you the users can request features to be placed inside of the ProjectWise PowerShell Modules.
It would be great if the -BentleyIMS switch for New-PWlogin could be fixed. I see a few posts where it doesn't seem to work. Personally i am using this through Visual Studio and my only options are to keep my accounts logical, or use the admin account hard coded in my code which is not ideal.
Hmm. My normal login is New-PWLogin Server:DSN -BentleyIMS. As long as your Connection Client is connected, that should work fine. Maybe your Visual Studio and Connection Client are running as different users? I've never tried this in VS. Not really sure about your use case. Are you developing scripts in VS and then debugging them there? I think many people run VS in elevated mode. Maybe there is some conflict with that? I'll check on running scripts in my VS.
Yes they are, all of our company user accounts are federated with Bentley. The only logical accounts are external users and the admin account.
I asked a similar question on another thread and another user experienced the same thing. This shows a more complete example of the code im running
Running ProjectWise PowerShell Commands through Visual Studio
I will double check running the script through the normal ISE soon. I believe it only worked with the "-UseGUI" switch, but in a program this is not ideal
I figured, but just wanted to ask and ensure. Thanks.
Hmm. I've never seen that before. Why run scripts in a program when you could just write a program using something like MostOfDavesClasses in Github? Trying to get some reuse, maybe? Maybe is the VB requirement? I'll take a look at it, but the example will be in C# and not VB...
And, does the issue show up when you debug your program in VS or when you run the exe?
The program is not just for running PowerShell cmdlets it has a few things in it. It was a bit of a hobby / quick tools to help with a few things and as all programs go it kind of kept getting bigger.
I'm not doing anything special when running VS, its just running in standard mode (not as admin). I haven't tried running the exe to see if it works, i would assume if the issue occurs debugging? I'll try to run the exe and see if its any different.