Home Dashboard Directory Help
Search

Get-Help -Online fails for a number of cmdlets when used from the FileSystem provider by Aleksandar Nikolić


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 769350
Opened: 10/31/2012 12:13:41 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

It you try the following commands:

PS C:\> $cmdlets = 'add-content','clear-content','get-item'.'get-childitem','get-content','remove-item','set-content','test-path'
PS C:\> $cmdlets | foreach {help $_ -online}

The last one will fail for all cmdlets in an array except for the Test-Path cmdlet.

The reason for that is that Get-Help –Online is dependent of a PowerShell provider now. Thus, for example, we have generic Test-Path online help topic and Test-Path for FileSystem online help topic.

Unfortunately, the Uri property is populated properly only for the Test-Path cmdlet:


# FileSystem provider; Uri is missing for the Get-ChildItem cmdlet
PS C:\> get-help test-path | ft name,@{name='Uri';e={($_.relatedlinks | select -exp navigationlink | select -exp uri)[0]}}

Name                                                                     Uri
----                                                                     ---
Test-Path                                                                 http://go.microsoft.com/fwlink/?LinkId=231703


PS C:\> get-help get-childitem | ft name,@{name='Uri';e={($_.relatedlinks | select -exp navigationlink | select -exp uri)[0]}}

Name                                                                     Uri
----                                                                     ---
Get-ChildItem

# Registry provider; both cmdlets have Uri property (notice that Test-Path has now a different one than in FileSystem provider)
PS HKLM:\> get-help test-path | ft name,@{name='Uri';e={($_.relatedlinks | select -exp navigationlink | select -exp uri)[0]}}

Name                                                                     Uri
----                                                                     ---
Test-Path                                                                 http://go.microsoft.com/fwlink/?LinkID=113418


PS HKLM:\> get-help get-childitem | ft name,@{name='Uri';e={($_.relatedlinks | select -exp navigationlink | select -exp uri)[0]}}

Name                                                                     Uri
----                                                                     ---
Get-ChildItem                                                             http://go.microsoft.com/fwlink/?LinkID=113308
Details
Sign in to post a comment.
Posted by Roman Kuzmin on 11/1/2012 at 4:59 AM
Online help of test-path, clear-content, and remove-item works for me . But other commands have issues.
Sign in to post a workaround.