Correct format for xml files passed to winrm invoke RRS feed

  • Question

  • Hi,

    I am trying to use winrm invoke DestroyVirtualMachine to delete a vm on
    my Hyper-V 2008 server. The command I am executing is as follows:

    winrm invoke DestroyVirtualMachine
    -file:c:\test.xml -r:MyServer -a:Basic -u:Administrator -p:MyPassword

    where the file test.xml contains the following:

    <p:DestroyVirtualSystem_INPUT xmlns:p="">
    <q:ComputerSystem xmlns:q="">

    But I get an error:

                    Message = The XML namespace URI ( is invalid. Check the documentation for constructing the namespace URI for a CIM class.

    Error number:  -2144108456 0x80338058
    The WS-Management service cannot identify the format of the object passed to a Put or Create method. The XML namespace for the input XML is invalid. Change the XML namespace for the input XML in the request.

    I have tried many different permutations of the xml, with and without
    namespace declarations, but cannot seem to get this to work. Would
    anyone have an idea on where I am going wrong?

    Wednesday, April 1, 2009 10:26 AM

All replies

  • Similar issue with vmms.ModifyVirtualSystem method... Can't find the format of the Msvm_VirtualSystemSettingData instance.
    Does anybody already succeed to make that work?
    Monday, January 25, 2010 12:10 PM