Clinton,
here is the whole piece.. Short and simple...
Obviously, I left out $cred piece.. But if you are using straight RPC you should have no issue and can drop -cred if you have access already
And dfmimport is just a dump from dfm that we do in powershell
#Import filers
$dfmimport = import-csv c:\powershell\dfmcontrollers.csv | Select controller
$dfmimport | % {
$filer = $_.controller
Write-host "`n`tConnectiong to controller " $filer
$c = connect-nacontroller $filer -cred $cred
Write-host "Oplock Stats for controller:" $_.controller -fore Red -back Black
Ac -path c:\temp\opstats.log -value "`nController: $($filer)"
(Invoke-NaSsh cifs stat).Split("`n").Trim() | % {if ($_.StartsWith("OpLkBkNoBreakAck")) { ac -path c:\temp\opstats.log -value $_ }}
Ac -path c:\temp\opstats.log -value "----------------------"
Disclaimer - This is all with the through process that cifs is running.. I didn't build in logic otherwise..