New-LocalUser -Name "User03" -FullName 'testname' -Description "Description of this account." -NoPassword
New-NavServerUser -WindowsAccount User03 -FullName 'test' -ServerInstance 'MicrosoftDynamicsNavServer$Nav'
New-NavServerUser -WindowsAccount User03 -FullName $FullName -ServerInstance 'MicrosoftDynamicsNavServer$Nav'
$FullName = (get-WmiObject -Class Win32_UserAccount | Where-Object -FilterScript {$_.Caption -eq "User03"}).FullName
into the console, there is no output. Also there is no error massage so i could not imagine why it does not work.$FullName
get-WmiObject -Class Win32_UserAccount
$FullName = (get-WmiObject -Class Win32_UserAccount | Where-Object -FilterScript {$_.Caption -eq "Domain\User03"}).FullName
$FullName = (get-WmiObject -Class Win32_UserAccount | Where-Object -FilterScript {$_.Caption -like "User03"}).FullName
Answers
Have you tried this commanda alone to see the users:
Because I think that you are missing the domain name in the filter for the Caption value.
Or you can use the like comparation instead the equal one.
Regards.