To run a PowerShell command from a process, do the procedure in this topic.
    
    
    
    
    Configuration for calling PowerShell Command Screen
      
      
      
      
     
    
    Prerequisites
 
       
       
        - AgilePoint PrivateCloud (on-premises) environment.
 
        
      
 
     
    
    
        
    How to Start
 
         
         
          - On the Organizer, 
            do one of these: 
            
            
            
          
 
          
          
          - Do one of these:
            
              - Add an activity:
                
                  
                  - In the Process Builder, in the Activity Library, 
                    open the Utilities 
 tab. 
                  - Utilities 
,
                    drag the PowerShell Command 
 
                    activity onto your process.
                   
                  
                
                
               
              - Change an activity: 
                  - In your process, double-click your activity.
 
                
               
            
            
            
           
          - Click 
            PowerShell Command 
.
           
        
 
       
    
    
      Procedure
 
         
        
         
                    
          - To run a PowerShell command, on the Configuration for calling PowerShell Command screen,do one of these. 
              - To enter the command manually, do this procedure. 
                  - Select Input Text.
 
                  - In the Command field, enter your PowerShell command code.
 
                
               
              - To enter the command from a file on the server, do this procedure. 
                  - Select Read From File.
 
                  - Complete these fields 
	 				as necessary
                    
                        | Field Name | 
                        Value | 
                      
        File Path (AgilePoint Server File Path) 
 | 
        
        
          
          
            
              - Function:
 
              - Specifies the location of the file that contains the PowerShell command. 
 
            
            
            
              - To Open this Field:
 
              - Select Read From File.
 
            
            
            
              - Accepted Values:
 
              
              - An absolute path and file name on the AgilePoint Server or SharePoint Server.
                
The file name must have the extension .bat or .txt. 
               
              
            
            
            
              - Default Value:
 
              
              - None
                
              
 
            
            
            
              - Accepts Process Data Variables:
 
              
              - Yes
 
            
            
            
              - Example:
 
              - 
                
                  - c:\My Documents\sample1.doc
 
                  - ${HomeDirectory}\sample2.doc
 
                  - http://demo3:8000/DocumentLib1/sample3.doc
 
                 
               
            
            
           
          
         | 
      
                   
                
               
            
           
          - In the Return Value field, enter the 
            process data variable where you want to store the return value returned from your PowerShell command.