Data Infrastructure Management Software Discussions


Get-NaTime returns NULL


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")]



# 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,



Re: Get-NaTime returns NULL


I've tested your command with a 7.3.5 array and its working fine.

Can you please add the following right after the "Connect-WfaController" so I can test if this is related to ONTAP version:

Get-WfaLogger -Info -message $(Get-NaSystemVersion)



BTW, regardless of this problem, the "Connect-WfaController" in your command i referring to $VFilerName which isn't defined as a parameter and is never initialized. It is safe to remove this.


Re: Get-NaTime returns NULL

Hi Michael,

Thanks for responding.

I've tried it with controllers running 7.3.4 and 8.1.1 but get the same response.

The commands run fine on those controllers when ran as part of a script or interactively i.e. it only seems to be an issue when running the commands from WFA.

I'll export the command and email you the DAR file in a few moments...




Re: Get-NaTime returns NULL

So I upgraded from WFA 2.0RC1 to the version on the download site

I ran the command again and it also failed.  But this time it told me why:-)  The user I am running the WFA service as doesnt have access to call the clock-get APIs.  I nodified my roles on the filer and it now works...

Thanks for you help...

Check out the KB!
Knowledge Base
All Community Forums