Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Save and ge back a PsSession (to MS Exchange)

$
0
0

Hello,

I'am using a webservice (in PHP) which connect to a windows server and execute a powershell script to connect to Microsoft Exchange (and interract with it).

 

But each time an operator is using the webservice, a new connexion to Ms Exchange is opened and closed. (and this method is really long.. and boring for operators)

 

I would like to open a persistant connexion to Ms Exchange (PsEssion) which i will retrieve in any others processes.

 

exemple:

1 - a shceduler is executing a powershell script to connect to microsoft exchange with a PsSession

2 - The webservice launch another powershell process and retrieve the existing PS-Session.

(so, no more connexion)

 

Is it possible? Actually, when a PS-Session is running into one process, if a second process

runs "Get-PsSession" there is no result..

 

Thanks for your help

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles