I tested this for you in my lab. The result was:
cluster1::> export-policy rule create -policyname * -clientmatch 172.22.16.83/32 -rorule sys -rwrule sys -allow-suid true -superuser any -allow-dev true -protocol nfs -ruleindex 78
Error: The value "*" contains one or more query characters and queries are not supported for the "-policyname" parameter. To use query characters as literals add quotes around the value.
The "create" command does not support queries.
It appears you can't use a wildcard in combination with the "export-policy rule create" command. Also is there a reason you would need to grant RW access to the export policies applied to vserver root volumes? It depends what your export-policy rules are for your vserver root volumes but generally this is usually RO and the data volumes mounted to it are RW. How is this configured in your environment? Does that host really require RW access to your vserver root volumes?
Have you considered automating the process using WFA? This would ensure any new data volumes with export policies have an export rule created (with the exception of vserver root volumes). This should give you a list of export polices that require an export rule to be added.
export_policy.name AS 'export_policy_name',
volume.name AS 'volume_name',
vserver.name AS 'vserver_name'
export_rule.clientmatch <> '172.22.16.83/32'
export_policy.vserver_id = vserver.id
export_rule.policy_id = export_policy.id
volume.vserver_id = vserver.id
volume.export_policy_id = export_policy.id
volume.junction_path <> '/'
vserver.cluster_id = cluster.id
cluster.primary_address = 'cluster1.testlab.local' OR
cluster.name = 'cluster1'
You could then process the recordset in a repeat row for each export policy that does not have an export rule for the client match and create it.
Hope that gives you some ideas.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.