{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":29693,"path":"it-operations-management/discovery/mid-server-parameter-powershell.md","title":"MID Server parameters for PowerShell","bundle":null,"doc_type":null,"release":"australia","body":"\n# MID Server parameters for PowerShell\n\nParameters control the behavior of a particular MID Server and have lower precedence than MID Server properties.\n\nThe following parameters are optional.\n\n**Note:** After changing the setting for any parameter, be sure to restart the MID Server service.\n\n<table id=\"table_trv_b4r_pfb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmid.powershell\\_api.session\\_pool.max\\_size\n\n</td><td>\n\nSpecifies the maximum number of sessions allowed in the session pool.\n\n **Note:** Setting or changing this parameter requires restarting the MID Server.\n\n -   Type: Integer\n-   Default value: 25\n\n</td></tr><tr><td>\n\nmid.powershell\\_api.session\\_pool.target.max\\_size\n\n</td><td>\n\nSpecifies the maximum number of sessions allowed in the pool per target host.\n\n **Note:** Setting or changing this parameter requires restarting the MID Server.\n\n -   Type: Integer\n-   Default value: 3\n\n</td></tr><tr id=\"MIDServerPowershell_useSSL\"><td>\n\nmid.powershell\\_api.winrm.use\\_ssl\n\n</td><td>\n\nRequires the use of SSL certificates for HTTPS connections using WinRM.-   Type: True \\| False\n-   Default value: false\n\n</td></tr><tr id=\"MIDServerPowershell_additionalPSSessionOptions\"><td>\n\nmid.powershell\\_api.winrm.additional\\_pssesion\\_options\n\n</td><td>\n\nControls advanced options for a PSSession. For more information about advanced PSSession options, see [https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/new-pssessionoption?view=powershell-6](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/new-pssessionoption?view=powershell-6).\n\n</td></tr><tr id=\"MIDServerPowershell_APIWinrmRemoteHttpsPort\"><td>\n\nmid.powershell\\_api.winrm.remote\\_https\\_port\n\n</td><td>\n\nConfigures the port for connecting to Windows servers using PowerShell over HTTPS. -   Type: Integer\n-   Default value: 5986\n\n</td></tr><tr id=\"MIDServerPowershell_APIWinrmRemotePort\"><td>\n\nmid.powershell\\_api.winrm.remote\\_port\n\n</td><td>\n\nConfigures the port for connecting to Windows servers using PowerShell over HTTP. -   Type: Integer\n-   Default value: 5985\n\n</td></tr><tr id=\"MIDServerPowershell_skipSSLCertCheck\"><td>\n\nmid.powershell\\_api.winrm.skip\\_ssl\\_cert\\_check\n\n</td><td>\n\nSkips the SSL certificate check when using WinRM for HTTPS connections.-   Type: True \\| False\n-   Default value: false\n\n</td></tr><tr id=\"MIDServerPowershell_skipSSLCertCheckOptions\"><td>\n\nmid.powershell\\_api.winrm.skip\\_ssl\\_cert\\_check\\_options\n\n</td><td>\n\nSkips specific SSL certificate checks when using WinRM for HTTPS connections. Configure the MID Server to skip checks for certificates from a Certification Authority \\(CA\\), from the Common Name \\(CN\\) that identifies the host associated with the certificate, and for revoked certificates.\n\n-   Type: String\n-   Default value: -SkipCACheck -SkipCNCheck -SkipRevocationCheck\n\n</td></tr><tr><td>\n\nmid.powershell\\_api.wmi.use\\_reverse\\_dns\\_lookup\n\n</td><td>\n\nEnable this property to utilize Kerberos authentication when employing the WMI protocol to communicate with Windows target devices. When activated, the system performs a reverse DNS look-up of IP addresses, enabling the use of Fully Qualified Domain Names \\(FQDN\\) instead of IP addresses. This can facilitate Kerberos authentication.\n\n **Note:** Note: If the reverse DNS look-up fails, the system may revert to using the IP address. Additionally, performing reverse DNS look-ups on IP addresses may impact performance.\n\n -   Type: True \\| False\n\n-   Default value: False\n\n\n</td></tr><tr id=\"MIDServerPowershell_useCredentials\"><td>\n\nmid.powershell.use\\_credentials\n\n</td><td>\n\nDetermines the credentials to use for Discovery with PowerShell. A setting of true directs the MID Server to run probes with the Windows credentials from the credentials table. To run probes with the credentials of the user for the MID Server service, set this parameter to false.\n\n-   Type: true \\| false\n-   Default value: true\n\n</td></tr><tr id=\"MIDServerPowershell_UsePowerShell\"><td>\n\nmid.use\\_powershell\n\n</td><td>\n\nEnables or disables PowerShell for Discovery. Restart the MID Server after changing the value. If PowerShell is not installed or the version installed is less than version 2.0, Discovery reverts to using WMIRunner.\n\n-   Type: true \\| false\n-   Default value: true\n\n</td></tr><tr id=\"MIDServerPowershell_Path\"><td>\n\nmid.powershell.path\n\n</td><td>\n\nEnables an administrator to point to a specific PowerShell on a MID Server in cases where more than one PowerShell is installed. Supply the path to the folder containing the PowerShell executable, for example, `C:\\mypowershell` or `C:\\mypowershell\\`. ServiceNow automatically appends the string powershell.exe to the path. Configure this parameter when both a 32-bit and 64-bit PowerShells are active on the same MID Server, and it becomes necessary to launch the correct PowerShell for the context. 64-bit Windows employs file system redirection and the MID Server runs as a 32-bit application. If trying to specify a path in %WinDir%\\\\System32, Windows automatically redirects to %WinDir%\\\\SysWOW64. To avoid redirection, specify the path as %WinDir%\\\\Sysnative. For example, instead of C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\, specify C:\\\\WINDOWS\\\\sysnative\\\\WindowsPowerShell\\\\v1.0\\\\.\n\n **Note:** On a 64-bit version of Windows XP, a Microsoft hotfix may be required to enable this.\n\n To discover applications running on a 64-bit Windows machine, the MID Server must be running on a 64-bit Windows host machine.\n\n -   Type: string \\(path\\)\n-   Default value: none\n\n</td></tr><tr id=\"MIDServerPowershell_enforceUTF8\"><td>\n\nmid.powershell.enforce\\_utf8\n\n</td><td>\n\nEnable this parameter to force commands on a target Windows system to return UTF-8 encoded output. Disabling it allows the target system to use its default encoding. This parameter is only valid when PowerShell is enabled.Setting this value to false may result in incorrect values in the CMDB when non-ASCII characters are returned by a probe.\n\n -   Type: true \\| false\n-   Default value: true\n\n</td></tr><tr><td>\n\nmid.powershell.local\\_mid\\_service\\_credential\\_fallback\n\n</td><td>\n\nSpecifies the login credentials the MID Server uses if all other credentials fail.-   Type: True \\| False\n-   Default value: true\n\n</td></tr><tr id=\"MIDServerPowershell_idleSessionTimeout\"><td>\n\nmid.powershell\\_api.idle\\_session\\_timeout\n\n</td><td>\n\nSpecifies the timeout value of idle PowerShell sessions in seconds.\n\n **Note:** Setting or changing this parameter requires restarting the MID Server.\n\n -   Type: Integer\n-   Default value: 60\n\n</td></tr><tr id=\"MIDServerPowershell_parameterPassing\"><td>\n\nmid.powershell.command.parameter\\_passing\n\n</td><td>\n\nEnable this parameter to allow passing PowerShell parameters from the command line.-   Type: True \\| False\n-   Default value: false\n\n</td></tr><tr id=\"MIDServerPowershell_ScriptParameterPassing\"><td>\n\nmid.powershell.command.script.parameter\\_passing\n\n</td><td>\n\nEnable this parameter to allow passing PowerShell scripts from the command line.-   Type: True \\| False\n-   Default value: false\n\n</td></tr><tr><td>\n\nmid.windows.management\\_protocol\n\n</td><td>\n\nEnables administrators to select the Windows management protocol used for device and process classification. Options include:\n\n-   WMI\n-   WinRM\n\n -   Type: String\n-   Default value: WMI\n\n</td></tr><tr><td>\n\nmid.windows.probe\\_timeout\n\n</td><td>\n\nSets the timeout interval for all Windows probes on a specific MID Server. This value is overridden by the values configured for individual probes with the wmi\\_timeout probe parameter.-   Type: Integer\n-   Default value: 600\n\n</td></tr></tbody>\n</table>**Parent Topic:**[PowerShell for Discovery and Service Mapping](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/discovery/r_PowerShellForDiscovery.md)\n\n"}}