wdsutil not executable remotely?

hi

i've been trying almost every way i know to execute wdsutil in a remotely executed script. wdutil commands not accessing the configuration (/? /help,..) are working from a remote machine using psexec, PowerShell {Invoke-Command} or even in a remote PSsession. But as soon as i query or add something in WDS, the following Error occurs:


[wds01]: PS C:\> wdsutil /get-allservers /show:all

Windows Deployment Services Management Utility [Version 6.1.7600.16385]
Copyright (C) Microsoft Corporation. All rights reserved.


An error occurred while trying to execute the command.
Error Code: 0x6E
Error Description: The system cannot open the device or file specified.

--> same behavior using psexec or invoke-command.

The only way, i found this working, is using psexec with the option to execute the command as nt authority\system. (PsExec.exe \\WDS01 -s wdsutil /get-allservers /show:all) which isn't very useful, as i would need to execute commands which require higher privileges in the remote script.

Do you know other ways of executing wdsutils in a remotely executed script, or any solution to this?

thank you

 

June 21st, 2011 7:29am

Most WDSUTIL commands can be executed remotely from any machine with WDS or the WDS RSAT tools. 

This particular command (/get-allservers) requires AD access that you might not have, but the SYSTEM account on the WDS server would (since it is running the WDS service). 

Are you trying this with a domain admin account?

Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2011 7:41am

Hello Sumesh

I found the same behavior using "wdsutil /get-image /image:Test /imagetype:boot /Architecture:x86".

If i execute the command locally (on the Server running the WDS Service, in a RDP Session) both of the commands work. But when i try to execute the same command from a remote machine (by using psexec or a remote ps-session) if fails with the described error.

I'm using a Domain Admin Account to execute the command.

thank you

June 27th, 2011 6:23am

Hi Sumesh,

 

We could use three different methods to remotely manage a server:

 

1. Managing from another Windows Deployment Services server
------------------------------------------------------------------------------

To do this, you must specify which server you want to manage. You can do this in either of the following ways:

Using the Windows Deployment Services MMC snap-in. First you must add the server to the console. To do this, right-click the Servers node and then click Add Server. Next, type the name of the server you want to add, or select it in the list. The server will be added to the left pane in the console, and you can perform any task by selecting it just as you would select the local server.


Using WDSUTIL. To specify a remote server to run a WDSUTIL command, append /Server:<name> to the command. For example:

WDSUTIL /Add-Image /ImageFile:C:\images\capture.wim /Server:MY-WDS-02 /ImageType:Boot

 

2. Managing from a remote server that is running Windows Server 2008 (but not Windows Deployment Services)
-----------------------------------------------------------------------------------------------------------------------------------

To do this, you can install Remote Server Administration Tools, which will install WDSUTIL and the Windows Deployment Services MMC snap-in on the server. To install Remote Server Administration Tools, open Server Manager, right-click the Features node, click Add Features, and then click Remote Server Administration Tools. Next click Role Administration Tools, and then click Windows Deployment Services Tools.

 

3. Using PsExec

---------------------------

You can also manage the server by using PsExec. For example: psexec \\<servername> \wdsutil /get-device /id:<GUID>

For information about using PsExec, see http://go.microsoft.com/fwlink/?LinkId=110605.

Thanks.

 

Kevin Ni, MCSE

 

Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 8:55am

I tried to do this by executing wdsutil from a centralized server in the datacenter - I want to trigger an update of an image in a remote office from one server in that office to pull the file from another server in that office.  However when I do so, it appears that the image is being pulled from the remote office down to the datacenter, and then pushed back up again to the other remote server - obviously not what we want.

How can I do this so that the remote server pulls the file directly from its local peer server on the same LAN?

June 25th, 2014 2:19am

Hi Kevin,

I am trying to do the same from a linux machine and getting the same error. I have tried WinRM, PyWMI and winexe but none of them worked for me.

Am i missing something?

Free Windows Admin Tool Kit Click here and download it now
June 9th, 2015 1:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics