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!
Looking for help making new index files
- Ferdinand Rios
- Posts: 373
- Last visit: Fri Sep 16, 2022 1:24 pm
Looking for help making new index files
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
Looking for help making new index files
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)
Attached files /FileUpload/7d/13803bd69ba3cb3ccc1571167be781.zip (594.2 KB)
- Ferdinand Rios
- Posts: 373
- Last visit: Fri Sep 16, 2022 1:24 pm
Looking for help making new index files
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.
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