On Windows, there is usually tighter control of PowerShell scripts (.ps1) than batch files or executables. For example, the default behaviour of double-clicking a batch file (.bat) will execute the script, but double-clicking PowerShell files (.ps1) will open Notepad for editing. In order to use PowerShell commands or scripts, the powershell.exe executable should be explicitly called. There are also command parameters like execution policy that may need to be specified.
To help users get started, we have created an one line example below which displays the current system time.
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Sta 'row,value'; $now=Get-Date; 'time,'+ $now.ToShortTimeString();
The command returns the system time together with the necessary headers in a CSV based format. This is required for parsing by the Toolkit plug-in.
When this is called under the Toolkit plug-in on a Windows Netprobe, the output on the Active Console will look like this.