Support Forums

Looking for help making new index files

Support forums for users of iPowerShell Pro
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
tobysmurf
Posts: 3
Joined: Wed Sep 26, 2012 9:18 am

Looking for help making new index files

Postby tobysmurf » Mon Oct 01, 2012 3:52 am

Hi!  I am using PowerShell to create an index file for NetApp's PowerShell toolkit.  I have the XML file, but when I try to run the commands listed in the help I see the following:

PS C:ontap> $namespace = @{command="http://schemas.microsoft.com/maml/dev/command/2004/10"; maml="http://schemas.micros
oft.com/maml/2004/10"; dev="http://schemas.microsoft.com/maml/dev/2004/10"}
PS C:ontap> $xml = select-xml -path "$pwdDataONTAP.C.dll-Help.xml"; -namespace $namespace -xpath "//command:name"
Missing expression after unary operator '-'.
At line:1 char:59
+ $xml = select-xml -path "$pwdDataONTAP.C.dll-Help.xml"; - <<<< namespace $namespace -xpath "//command:name"
    + CategoryInfo          : ParserError: (-:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpressionAfterOperator

If I remove the semicolon that the help file shows at the end of the xml file path, then I can continue to the third line as shown:

PS C:ontap> $namespace = @{command="http://schemas.microsoft.com/maml/dev/command/2004/10"; maml="http://schemas.micros
oft.com/maml/2004/10"; dev="http://schemas.microsoft.com/maml/dev/2004/10"}
PS C:ontap> $xml = select-xml -path "$pwdDataONTAP.C.dll-Help.xml" -namespace $namespace -xpath "//command:name"
PS C:ontap>
PS C:ontap> $xml | ForEach -Object{$_.Node.InnerText.Trim()} | Set-Content -Path c:ontapDataONTAP.C.dll-Help.index
ForEach-Object : Cannot bind parameter 'Process'. Cannot convert the "-Object" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock".
At line:1 char:15
+ $xml | ForEach <<<<  -Object{$_.Node.InnerText.Trim()} | Set-Content -Path c:ontapDataONTAP.C.dll-Help.index
    + CategoryInfo          : InvalidArgument: (:) [ForEach-Object], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.ForEachObjectCommand

Has Powershell's syntax changed for getting these XML files parsed?  Any help would be appreciated!
User avatar
Ferdinand Rios
Posts: 358
Joined: Tue Nov 14, 2006 2:56 am

Looking for help making new index files

Postby Ferdinand Rios » Mon Oct 01, 2012 7:39 am

I am looking into this. I have not been made aware of any help file structure changes; as a matter of fact, I was assured that there were no changes. But I have seen 3rd party help files that don't match the exact specs that MS has put out. Heck, I even found one MS file that did not meet their own specs. If you want to send me the .xml help file, I will take a look.
F.G. Rios
User avatar
tobysmurf
Posts: 3
Joined: Wed Sep 26, 2012 9:18 am

Looking for help making new index files

Postby tobysmurf » Mon Oct 01, 2012 6:20 pm

I have attached a zip with the DLLs and XML files. Hopefully this can point out what I have done wrong.

Attached files /FileUpload/7d/13803bd69ba3cb3ccc1571167be781.zip (594.2 KB)
User avatar
Ferdinand Rios
Posts: 358
Joined: Tue Nov 14, 2006 2:56 am

Looking for help making new index files

Postby Ferdinand Rios » Tue Oct 02, 2012 4:51 am

The help XML files that you supplied do not follow the MS PowerShell Help Structure. Here is an example from your file:







Sysstat_controller_table

DataONTAP.PowerShell.SDK.Cmdlets.Perf.SystemPerfInfo





5
Right



Here is an example of the Standard MS PowerShell Help format:








Add-ADGroupMember


Adds one or more members to an Active Directory group.




Add
ADGroupMember




As you can see, the structures are completely different. You should find out from the vendor if they have a standard format help file.
F.G. Rios

Return to “iPowerShell Pro”

Who is online

Users browsing this forum: No registered users and 1 guest