ActiveXPoSH syntax?

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
This topic is 15 years and 1 week 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.
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

ActiveXPoSH syntax?

Post by Alexander Riedel »

New version is up.
See http://www.sapien.com/blog

Alex
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
sabofx
Posts: 10
Last visit: Tue Sep 29, 2015 3:24 pm

ActiveXPoSH syntax?

Post by sabofx »

Hi guys!I just finished testing your new version of activexposh.I'm happy to confirm that the problem as described in my previous posts does not occur in the new version.THANX + CONGRATZ!! YOU SOLVED IT!I think it's great that you also added the
User avatar
sabofx
Posts: 10
Last visit: Tue Sep 29, 2015 3:24 pm

ActiveXPoSH syntax?

Post by sabofx »

Hey guys!Has there been any development lately on the ActiveXPoSh front?I am particularly interested if you plan to implement my third (generic) request:"Please consider implementing a method to read the 'Exit Code' of the
last command executed in PowerShell. It would be the easiest way to
notice if a command failed for some reason."Thanx & hope to hear from you soon!
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

ActiveXPoSH syntax?

Post by Alexander Riedel »

PowerShell really has no 'exit codes'.
If you want to know what a cmdlet returned, assign it to a value and query that value.
Or am I misunderstanding something?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
sabofx
Posts: 10
Last visit: Tue Sep 29, 2015 3:24 pm

ActiveXPoSH syntax?

Post by sabofx »

Hi Alex!It is this web page that lead me to believe that there is some sort of errorlevel:
http://blogs.msdn.com/powershell/archiv ... odes.aspxI do agree that it is possible to check for certain strings in the command output to evaluate if it was executed without errors. But an exit code / error level would be a more generic way with less hassle. I used to use errorlevels a lot when scripting batch files..Anyway, can you have a look at the URL above?Thanx,Joost!
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

ActiveXPoSH syntax?

Post by Alexander Riedel »

PowerShell.exe obviously has a return code that you could check if you where running each command as a seperate process.

ActiveXPosh is a custom PowerShell host, it doesn't simply shell out to PowerShell.exe, so that does not apply here. All the Cmdlets you run from ActiveXPosh run in the same shell instance and in the same process as your VBScript/JScript.

Alex

Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
sorin.rusnac@am.joneslanglasalle.com
Posts: 5
Last visit: Tue Jan 21, 2020 9:20 am

ActiveXPoSH syntax?

Post by sorin.rusnac@am.joneslanglasalle.com »

Hi Sabofx -

Can you tell me how you got ActiveXPosh to work from an ASP page? I have an application in ASP that I want to use ActiveXPosh to mail-enable an exisiting userid and I cannot get it to work. However if I do run it from the same server via a vbs file it works no issues.

The ASP page is running as an Admin account that has rights to exchange 2007 and Domain. Any hints or steps you took to mail-enable a userid in ASP would be very helpful looks like you got it to work.

This ASP program adds a new userid to AD and then it would run ActiveXPosh to mail-enable the new created user.

Thanks
User avatar
sansun50
Posts: 1
Last visit: Thu Apr 02, 2009 11:39 pm

ActiveXPoSH syntax?

Post by sansun50 »

Hi Joost,

Sapien is a wonderful tool and great help to run powershell via ASP pages.

I would like to thank you for highlighting "website in an application pool that runs under the identity of an domain administrative account" in this blog. I changed the application pool account to domain admin and woohoo !! it worked :-)

I was trying to create mailbox for last 1 month, I have been trying to run asp page but it was giving error "storage group not found", your posting has helped me great time.

Thanks once more.

Sunil
This topic is 15 years and 1 week 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.