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
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.
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.
- Ferdinand Rios
- Posts: 369
- Joined: Tue Nov 14, 2006 2:56 am
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: 369
- Joined: Tue Nov 14, 2006 2:56 am
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