Forum / NoMachine for Windows / Nxserver.exe –networkadd cannot run as nt authority/system
- This topic has 3 replies, 2 voices, and was last updated 2 weeks, 4 days ago by
Britgirl.
-
AuthorPosts
-
May 25, 2026 at 06:35 #56050
Pesky_UKParticipantI’m scripting deployment via my RMM which runs powershell scripts as SYSTEM, not powershell administrator.
Running
& 'C:\Program Files\NoMachine\bin\nxserver.exe' --networkadd --visible-set my@emailaddress.comfails because of this. Is there any way around this?
May 27, 2026 at 13:59 #56084
BritgirlKeymasterHi, we are unable to reproduce and can run that command successfully as a system user in Powershell and the machine was added to NoMachine Network. Can you show us the output of the following?
1. whoami
2. $(([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(544))” | Out-File $log -Append
3. $env:USERPROFILE
4. $env:COMPUTERNAME
5. Get-CimInstance Win32_ComputerSystem | Select-Object -ExpandProperty UserNameMay 27, 2026 at 15:12 #56085
Pesky_UKParticipantHi Britgirl. Outputs for you:
PS C:\WINDOWS\system32 > whoamint authority\system
$env:USERPROFILE
C:\WINDOWS\system32\config\systemprofile
$env:COMPUTERNAME
[removed by forum admin]
Get-CimInstance Win32_ComputerSystem | Select-Object -ExpandProperty UserName
[removed by forum admin]\[removed by forum admin]
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(544) | Out-File -FilePath $log -Append
Error Occured: Out-File : Cannot bind argument to parameter 'FilePath' because it is null.
At C:\Program Files\Gorelo\Agent\AppData\Scripts\00000000-0000-0000-0000-000000000000-execute.ps1:1 char:126
+ ... ntity]::GetCurrent()).IsInRole(544) | Out-File -FilePath $log -Append
+ ~~~~
+ CategoryInfo : InvalidData: (:) [Out-File], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.OutFileCommand
May 27, 2026 at 16:19 #56090
BritgirlKeymasterI’m sorry, I just noticed I gave you the wrong command to use in 2. It should be:
2. ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(544)
although it seems you are a system user anyway.
What is the OS on the system you are trying to add to Network? And can you send us the logs from that machine? (Settings > Server > Security , Take logs). Please send them to forum[at]nomachine[dot]com to avoid any sensitive information being made available here.
-
AuthorPosts
You must be logged in to reply to this topic. Please login here.
