Session import from within module


hello everyone,

i've been developing office365 script module lately , i've run small problem.

i have created function creates powershell session exchange online when import session function exchange commands not available on main powershell. can see session using get-pssession cmdlet.

i guess has scope of variables...

best regards,

christos

i gave try following command in function:

import-module (import-pssession $session -allowclobber) -global

, worked!


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2