Nxserver.exe –networkadd cannot run as nt authority/system

Forum / NoMachine for Windows / Nxserver.exe –networkadd cannot run as nt authority/system

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #56050
    Pesky_UK
    Participant

    I’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.com

    fails because of this. Is there any way around this?

    #56084
    Britgirl
    Keymaster

    Hi, 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 UserName

    #56085
    Pesky_UK
    Participant

    Hi Britgirl. Outputs for you:

    PS C:\WINDOWS\system32 > whoami

    nt 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

    #56090
    Britgirl
    Keymaster

    I’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.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Please login .