has anyone had any success parsing the dates returned from some DataOnTap cmdlets?
In particular, the LastOperationEnd date value returned from Get-NAVolSis which, annoyingly, returns a string value containing the Timezone info (e.g. CEST 2014) which .NET/Powerhsell doesn't handle at all well
edit: I notice some other cmdlets (get-NaSnapshot for example, return a proper datetime value). Why doesn't Get-NaSISVol do the same? This seems like a glaring inconsistency to me.
I'm writing a script to monitor certain things on our filers. One of the requirements is to check that the dedupe ran within the last 24 hours.
I've since found that I can use Get-NASis <volname> and that returns a DT formatted value (LastOperationEndTimestampDT). That's a proper datetime value which gives me what I want. It just seems strange that Get-NaSISVol (which, as far as I can tell does much the same thing as Get-NASis) returns a string value instead of datetime value.
Sure. It's a bit rough but it does the job
ForEach ($volume in $Volumes)
$ASISInfo=Get-NASIS "/vol/$Volumename" -erroraction silentlycontinue
If ($AsisInfo.LastOperationState -ne "success")
"ASIS last operation failed ($ASISError)"
If ($LastASISDate -lt (Get-Date).AddHours(-24))
"lastasisdate is bad"
No it's being used in a script that sends information to our monitoring server. It'll flag the particular alert as red if the Dedupe didn't run in the last 24 hours.