Skip to content

PowerShell

Integrate PowerShell with vScope by configuring temp folders for storing scripts used in inventorying assets. vScope uses two primary locations to store these scripts temporarily: on the vScope server itself and on remote Windows servers (for WinRM).


Requirements

  • Use JEA profiles to manage local permissions.
  • Update the JEA profile in vScope > Discovery.

Configuring Temp Folders on the vScope Server

To define a custom temp folder for scripts on the vScope server, modify the config.ini file located at C:\vScopeData\configuration\config.ini:

setting discovery.probe.wmi.local_script_folder %TEMP%
setting discovery.probe.wmi.local_script_folder c:\\windows\\temp
setting discovery.probe.wmi.local_script_folder null

Replace c:\windows\temp with the path of your choice. If the specified folder fails, vScope will revert to its default temp folder.

Configuring Temp Folders on Remote Windows Servers (for WinRM)

By default, vScope runs PowerShell scripts in a TEMP folder on each remote machine. This temp folder is defined by the environment variable $env:temp, which usually resolves to:

C:\Users\{wmi-credential-user}\AppData\Local\Temp

To specify a different remote folder for PowerShell script execution:

  1. Open the config.ini file on the vScope server, located at C:\vScopeData\configuration\config.ini.

  2. Add the following line to define a custom path:

    discovery.probe.wmi.remote_script_folder=[FOLDER_PATH]

Replace [FOLDER_PATH] with the desired path for the remote temp folder.

Ensure that the specified path is writable and accessible by the user associated with the WinRM credential.

Important Make sure the selected folder allows both read and write access, and that the user running vScope has sufficient permissions on the path.

By configuring these settings, vScope can use alternative locations for temporary PowerShell scripts on both the vScope server and remote Windows servers, enhancing security and flexibility during the inventory process.