Therez no straight forward command to satisfy your requirement.
I hope the below perl script will solve the purpose.
You might need to replace the values in the variables @counter_groups and @hosts in the below script as per your setup.
I have tested this in our lab on a DFM 4.0 server and it worked fine.
========================================================================================
#!/usr/bin/perl
my @counter_groups = ('system', 'iscsi', 'fcp', 'lun', 'volume', 'target');
my @hosts = ('abc123.lab.netapp.com', 'xyz123.lab.netapp.com');
my $host;
my $cg;
foreach $host (@hosts) {
foreach $cg (@counter_groups) {
print "Modifying the retention period for host = $host and cg = $cg\n";
system("dfm perf data modify -f -G $cg -o $host -r 90d")
}
}
=========================================================================================