Script to install EDID on remote PCs not working?

52 Views Asked by At

I have a script to apply an EDID configuration for our remote machines. The script works so long as I or someone else is logged in prior to the script running. However, the script fails if the machine sits at the Windows login screen without any active user sessions (ie after a reboot).

I'd like the script to successfully run regardless of active or no active user sessions.

$display = get-wmiobject -class gpu -namespace "root\cimv2\nv" invoke-wmimethod -path $display.__PATH -name edidport -argumentlist ("\my-srv\Dell u4017.txt","7","3") invoke-wmimethod -path $display.__PATH -name edidport -argumentlist ("\my-srv\Dell u4017W.txt","7","4")

The debug log shows: Invoke-WmiMethod : Cannot bind argument to parameter 'Path' because it is null. At C:\Windows\Deployadmin\DeployUser\service-1\exec\user.ps1:2 char:24

  • invoke-wmimethod -path $display.__PATH -name edidport -argument ...
  •                    ~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Invoke-WmiMethod], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.InvokeWmiMe thod

Any help or recommendations are appreciated. Thank you.

0

There are 0 best solutions below