Close PSM Session if PowerShell command throughs error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Close PSM Session if PowerShell command throughs error

L1 Bithead

Hi Team,

 

I have created a PowerShell connection component, which launches poershell and sends command, later pop up comes and which asks for password i am sending password and clicking on ok button. But If username and password is invalid i want close the session and pop up PSMS error message.

Field_Content_versions_oct20__068Ht00000UHzBiIAL.pngField_Content_versions_oct20__068Ht00000UHzBdIAL.png

10 REPLIES 10

L4 Transporter

Hi @Harish Reddy​ ,

​

This is not possible. The PSM will only receive disconnect once the connection component is closed. PSM has no control over the connection component error.

 

Thank you

L4 Transporter

Hi @Harish Reddy​ ,

​

This is not possible. The PSM will only receive disconnect once the connection component is closed. PSM has no control over the connection component error.

 

Thank you

Can't we read that error message using au3 script and send command to close session.?

The only way you can do is to close the PowerShell session if the error message appears. So that PSM will see session disconnect and closes the session

 

Thank you

The only way you can do is to close the PowerShell session if the error message appears. So that PSM will see session disconnect and closes the session

 

Thank you

Could you please help me how can i do that.?

Hi,

​

You can try this once base on the text you detect when username and password is invalid.

​

Function ProcessClose (autoitscript.com)

 

Thank you

Hi,

​

You can try this once base on the text you detect when username and password is invalid.

​

Function ProcessClose (autoitscript.com)

 

Thank you

Thank you so much,

​

One more question how to detect the username and password invalid result after executing the command. as you saw in previous SS.

 

 

Thanks in advance

Can you please update on this.

 

Thanks

 

  • 195 Views
  • 10 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!