 < ? x m l   v e r s i o n = ' 1 . 0 '   e n c o d i n g = ' U T F - 8 ' ? > 
 < d u n e s - s c r i p t - m o d u l e   n a m e = " i n v o k e S c r i p t "   r e s u l t - t y p e = " P o w e r S h e l l : P o w e r S h e l l R e m o t e P S O b j e c t "   a p i - v e r s i o n = " 6 . 0 . 0 "   i d = " F 5 8 5 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 1 5 8 0 8 0 8 0 0 1 2 6 6 5 8 2 4 0 4 7 2 1 5 7 f d a f c 0 f c e "   v e r s i o n = " 1 . 0 . 0 "   a l l o w e d - o p e r a t i o n s = " v f " > 
     < p a r a m   n = " h o s t "   t = " P o w e r S h e l l : P o w e r S h e l l H o s t " > < ! [ C D A T A [ ] ] > < / p a r a m > 
     < p a r a m   n = " s c r i p t "   t = " s t r i n g " > < ! [ C D A T A [ ] ] > < / p a r a m > 
     < p a r a m   n = " s e s s i o n I d "   t = " s t r i n g " > < ! [ C D A T A [ ] ] > < / p a r a m > 
     < s c r i p t   e n c o d e d = " f a l s e " > < ! [ C D A T A [ i f ( s e s s i o n I d   = =   n u l l ) { 
 	 t h r o w   " P o w e r S h e l l I n v o c a t i o n E r r o r :   I n v a l i d   s e s s i o n . " 
 } 
 
 v a r   o S e s s i o n   =   h o s t . g e t S e s s i o n ( s e s s i o n I d ) 
 i f   ( o S e s s i o n   = =   n u l l   ) 
 { 
 	 t h r o w   " P o w e r S h e l l I n v o c a t i o n E r r o r :   I n v a l i d   s e s s i o n . " 
 } 
 
 S y s t e m . d e b u g ( " I n v o k e   c o m m a n d   i n   s e s s i o n   "   +   s e s s i o n I d ) ; 
 v a r   r e s u l t   =   o S e s s i o n . i n v o k e S c r i p t ( s c r i p t ) ; 
 
 i f   ( r e s u l t . i n v o c a t i o n S t a t e     = =   ' F a i l e d ' ) { 
 	 t h r o w   " P o w e r S h e l l I n v o c a t i o n E r r o r :   E r r o r s   f o u n d   w h i l e   e x e c u t i n g   s c r i p t   \ n "     +   r e s u l t . g e t E r r o r s ( ) ; 
 } 
 
 S y s t e m . l o g   (   r e s u l t . g e t H o s t O u t p u t ( )   ) ; 
 
 r e t u r n   r e s u l t . g e t R e s u l t s ( ) 
 ] ] > < / s c r i p t > 
 < / d u n e s - s c r i p t - m o d u l e >