Export (0) Print
Expand All

Other Useful Scripting Objects

Updated: October 17, 2013

Applies To: Windows PowerShell 2.0, Windows PowerShell 3.0, Windows PowerShell 4.0

The following objects provide additional scripting functionality in Windows PowerShell ISE. They are not part of the $psISE hierarchy.

Useful Scripting objects

$psUnsupportedConsoleApplications

There are some limitations on how Windows PowerShell ISE interacts with console applications. A command or an automation script that requires user intervention may not work the way it works from the Windows PowerShell console. You may want to block these commands or scripts from running in the Windows PowerShell ISE Command pane. The $psUnsupportedConsoleApplications object keeps a list of such commands. If you try to run the commands in this list, you get a message saying that they are not supported. The following script adds an entry to the list:

# List the unsupported commands
psUnsupportedConsoleApplications
# Add a command to this list
psUnsupportedConsoleApplications.Add(“Mycommand”)
#Show the augmented list of commands
psUnsupportedConsoleApplications

$psLocalHelp

This is a dictionary object that maintains a context-sensitive mapping between Help topics and their associated links in the local compiled HTML Help file. It is used to locate the local Help for a particular topic. You can add or delete topics from this list. Below are some example key-value pairs contained in $psLocalHelp:

# See the local help map
$psLocalHelp |Format-List 

Sample Output:

Key : Add-Computer

Value : WindowsPowerShellHelp.chm::/html/093f660c-b8d5-43cf-aa0c-54e5e54e76f9.htm

Key : Add-Content

Value : WindowsPowerShellHelp.chm::/html/0c836a1b-f389-4e9a-9325-0f415686d194.htm

The following script adds an entry to the list:

$psLocalHelp.Add("get-myNoun","c:\MyFolder\MyHelpChm.chm::/html/0198854a-1298-57ae-aa0c-87b5e5a84712.htm")

$psOnlineHelp

This is a dictionary object that maintains a context-sensitive mapping between topic titles of Help topics and their associated external URLs. It is used to locate the Web Help for a particular topic. You can add or delete topics from this list.

$psOnlineHelp |format-list

Sample Output:

Key : Add-Computer

Value : http://go.microsoft.com/fwlink/?LinkID=135194

Key : Add-Content

Value : http://go.microsoft.com/fwlink/?LinkID=113278

The following script adds an entry to the list:

$psOnlineHelp.Add("get-myNoun","http://www.mydomain.com/MyNoun.html")

See Also



Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft