Looking for help making new index files

Support forums for users of iPowerShell. This forum does not offer a response time guarantee.
This topic is 11 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
tobysmurf
Posts: 3
Last visit: Mon Sep 26, 2016 5:21 pm

Looking for help making new index files

Post by tobysmurf »

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 = @{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: 373
Last visit: Fri Sep 16, 2022 1:24 pm

Looking for help making new index files

Post by Ferdinand Rios »

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
Last visit: Mon Sep 26, 2016 5:21 pm

Looking for help making new index files

Post by tobysmurf »

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: 373
Last visit: Fri Sep 16, 2022 1:24 pm

Looking for help making new index files

Post by Ferdinand Rios »

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




CPU
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
This topic is 11 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.