Hello,
I'm trying to write a command that retrieves the local date and time of the filer. Code snippet below:
param (
[parameter(Mandatory=$true, HelpMessage="Array name or IP address")]
[string]$PrimaryArray
)
# connect to controller
Connect-WFAController -Array $PrimaryArray -VFiler $VFilerName
$PrimaryDateTime = Get-NaTime
$PrimaryDateTimeLocal = $PrimaryDateTime.LocalTimeDT
Get-WFALogger -Info -message $($PrimaryDateTimeLocal)
However, Get-NaTime always seems to return null.
And the Get-WFALogger fails complaining that there is a null message as per extract below:
11:08:40.188 INFO [timezone test] Connected to controller
11:08:43.843 ERROR [timezone test] Cannot bind argument to parameter 'message' because it is null.
11:08:44.187 INFO [timezone test] Command completed, took 7030 milliseconds
If anyone has any ideas what might be going wrong I'd really appreciate it?
Many Thanks,
Mark