Handling of escape chars with VBoxManage in PowerShell

This is for discussing general topics about how to use VirtualBox.
Post Reply
floogy
Posts: 15
Joined: 16. Nov 2019, 13:06

Handling of escape chars with VBoxManage in PowerShell

Post by floogy »

Hello,

I got general issues on finding how to escape e.g. spaces and special chars in pathnames etc. or how to address things at all <uuid|snapname> or take <name> [--description <desc>] [--live] [--uniquename Number,Timestamp,Space,Force]

Code: Select all

PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  showvminfo fff9d5ef-905c-45ea-99ee-b01a83b70d48
VBoxManage.exe: error: Could not find a snapshot with UUID {fff9d5ef-905c-45ea-99ee-b01a83b70d48}
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "FindSnapshot(Bstr(a->argv[2]).raw(), pSnapshot.asOutParam())" at line 619 of file VBoxManageSnapshot.cpp
PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  showvminfo {fff9d5ef-905c-45ea-99ee-b01a83b70d48}
Oracle VM VirtualBox Command Line Management Interface Version 6.0.14
(C) 2005-2019 Oracle Corporation
All rights reserved.

Usage:

VBoxManage snapshot         <uuid|vmname>
                            take <name> [--description <desc>] [--live]
                                 [--uniquename Number,Timestamp,Space,Force] |
                            delete <uuid|snapname> |
                            restore <uuid|snapname> |
                            restorecurrent |
                            edit <uuid|snapname>|--current
                                 [--name <name>]
                                 [--description <desc>] |
                            list [--details|--machinereadable] |
                            showvminfo <uuid|snapname>


Syntax error: Expecting snapshot name only
PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  showvminfo "{fff9d5ef-905c-45ea-99ee-b01a83b70d48}"
VBoxManage.exe: error: Could not find a snapshot with UUID {fff9d5ef-905c-45ea-99ee-b01a83b70d48}
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "FindSnapshot(Bstr(a->argv[2]).raw(), pSnapshot.asOutParam())" at line 619 of file VBoxManageSnapshot.cpp
PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  showvminfo "fff9d5ef-905c-45ea-99ee-b01a83b70d48"
VBoxManage.exe: error: Could not find a snapshot with UUID {fff9d5ef-905c-45ea-99ee-b01a83b70d48}
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "FindSnapshot(Bstr(a->argv[2]).raw(), pSnapshot.asOutParam())" at line 619 of file VBoxManageSnapshot.cpp
PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  showvminfo '{fff9d5ef-905c-45ea-99ee-b01a83b70d48}'
VBoxManage.exe: error: Could not find a snapshot with UUID {fff9d5ef-905c-45ea-99ee-b01a83b70d48}
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "FindSnapshot(Bstr(a->argv[2]).raw(), pSnapshot.asOutParam())" at line 619 of file VBoxManageSnapshot.cpp
PS C:\Program Files\Oracle\VirtualBox> cd ..
PS C:\Program Files\Oracle> cd ~
PS C:\Users\floogy> vboxmanage
vboxmanage : Die Benennung "vboxmanage" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder
eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ vboxmanage
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (vboxmanage:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: Der Befehl vboxmanage wurde nicht gefunden. Er ist jedoch am aktuellen Ort vorhanden. Windows PowerShell lädt Befehle nicht standardmäßig vom aktuellen Ort. Wenn Sie diesem Befehl vertrauen, geben Sie stattdessen ".\vboxmanage" ein. Weitere Informationen erhalten Sie unter "get-help about_Command_Precedence".
PS C:\Users\floogy> .\vboxmanage
Oracle VM VirtualBox Command Line Management Interface Version 6.0.14
(C) 2005-2019 Oracle Corporation
All rights reserved.

Usage:

  VBoxManage [<general option>] <command>


General Options:

  [-v|--version]            print version number and exit

Code: Select all

PS C:\Users\floogy> ls "C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots"

    Verzeichnis: C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       13.11.2019     15:40      214041573 2019-11-13T14-40-20-393705300Z.sav
-a----       14.11.2019     02:57      196933748 2019-11-14T01-57-17-210555100Z.sav
-a----       14.11.2019     18:51      198225756 2019-11-14T17-51-02-332022700Z.sav
-a----       14.11.2019     19:57      399749656 2019-11-14T18-57-31-807764400Z.sav
-a----       14.11.2019     20:24     1969897059 2019-11-14T19-23-44-953666700Z.sav
-a----       14.11.2019     20:33     1799667763 2019-11-14T19-33-39-501670100Z.sav
-a----       14.11.2019     20:48      818762964 2019-11-14T19-48-41-563756500Z.sav
-a----       14.11.2019     21:34     2881550582 2019-11-14T20-33-39-932801300Z.sav
-a----       14.11.2019     21:45      699844179 2019-11-14T20-45-03-426239200Z.sav
-a----       14.11.2019     21:52      542892490 2019-11-14T20-52-09-243939000Z.sav
-a----       14.11.2019     22:13      644877078 2019-11-14T21-13-47-707161600Z.sav
-a----       14.11.2019     22:39      690917425 2019-11-14T21-39-10-876503900Z.sav
-a----       14.11.2019     22:56      597295632 2019-11-14T21-56-18-683270600Z.sav
-a----       14.11.2019     23:05      613572393 2019-11-14T22-04-57-270074500Z.sav
-a----       14.11.2019     23:14      555145583 2019-11-14T22-14-28-932619600Z.sav
-a----       15.11.2019     00:03      894574346 2019-11-14T23-03-08-683647000Z.sav
-a----       15.11.2019     12:56     2532412406 2019-11-15T11-55-51-706296700Z.sav
-a----       15.11.2019     14:39      601666281 2019-11-15T13-39-18-964137700Z.sav
-a----       15.11.2019     15:04      585569790 2019-11-15T14-04-19-092025900Z.sav
-a----       15.11.2019     15:32     1762278848 2019-11-15T14-32-03-838565000Z.sav
-a----       15.11.2019     15:54     2183430048 2019-11-15T14-54-18-788046000Z.sav
-a----       15.11.2019     16:40      997074919 2019-11-15T15-40-36-509994200Z.sav
-a----       15.11.2019     17:37     1586915494 2019-11-15T16-37-39-757641200Z.sav
-a----       15.11.2019     21:03      643046387 2019-11-15T20-03-03-419552500Z.sav
-a----       15.11.2019     16:40     4405575680 {0011126d-4148-4378-aa74-a452b8a48ec6}.vhd
-a----       16.11.2019     11:50      413721088 {009a3df1-9393-40b9-a1d3-c35d508b1eab}.vhd
-a----       14.11.2019     20:23       15164928 {01f8ae05-6f65-4d2b-89bc-900f3c876d0b}.vhd
-a----       14.11.2019     23:14       13067264 {02326d44-445a-4ebf-bb03-d4122d870821}.vhd
-a----       14.11.2019     23:14     4609049088 {03c811c4-8750-43cb-8ab3-7c819cc9c439}.vhd
-a----       14.11.2019     22:13      109246464 {04c15a88-1c0c-4d5e-9095-675691d04261}.vhd
-a----       14.11.2019     19:57      178782720 {08255354-87a5-4937-a72b-af9c0937d7d6}.vhd
-a----       14.11.2019     20:48      185075712 {09ad1b3d-704e-4633-86ad-f6215da01821}.vhd
-a----       14.11.2019     20:33       13067264 {0f611102-81b2-4238-8777-5111c5d9ced9}.vhd
-a----       14.11.2019     20:23     1204227072 {0fd98c83-a983-4237-a4ac-8f49c8800ddb}.vhd
-a----       14.11.2019     21:33       17262592 {0fe9bc8c-ee57-4d0e-978d-99ac0c7e1d39}.vhd
-a----       16.11.2019     11:50      327716864 {1190a7f7-adda-4510-9ab5-b365d01513b8}.vhd
-a----       14.11.2019     23:14       77781504 {1344c46d-801a-4727-a5e2-aa93fae4b42d}.vhd
-a----       15.11.2019     15:54     2213516800 {167684e5-1852-4640-811c-0b0cf325324f}.vhd
-a----       14.11.2019     18:51       21457920 {17c31658-a6d8-4298-99fb-5525c45f9262}.vhd
-a----       14.11.2019     20:23       15164928 {197764d9-65df-4db2-b0de-18dc327f42a8}.vhd
-a----       15.11.2019     15:04        8871936 {1b053d04-1e94-4486-894a-647615429811}.vhd
-a----       15.11.2019     12:55       57118208 {1b9d3fc4-bb9f-4272-aa9f-e08c8ef3d29d}.vhd
-a----       15.11.2019     16:40      178469376 {1c9f93bf-cbe0-4f93-b48c-600d093277be}.vhd
-a----       14.11.2019     18:51     3021117440 {1f5ec271-3e8f-4c51-be47-c72142c49c61}.vhd
-a----       14.11.2019     23:04        8871936 {22b57e73-db76-4400-87b4-6001281ecd82}.vhd
-a----       14.11.2019     22:39     1762519040 {24d8ffb5-b2dc-431f-a4cf-58b7c71340a1}.vhd
-a----       15.11.2019     21:03      512311296 {2af5ca08-3f0e-41a8-8492-6f7fce3a010d}.vhd
-a----       14.11.2019     22:56       17262592 {2af86c20-6ab6-430a-9650-b709b06bf18e}.vhd
-a----       16.11.2019     11:50    22281868288 {2dff3853-b46c-4bcb-ba14-06c16311840f}.vhd
-a----       14.11.2019     23:04      134418432 {2ffdfa55-4f67-406c-9fd0-6cea8e3f494b}.vhd
-a----       15.11.2019     15:04      176685056 {31e0616b-dc20-4cdd-aaee-25969503a85a}.vhd
-a----       15.11.2019     21:03     2876065280 {3cb942fa-d30c-4a32-b981-fc41e3c54317}.vhd
-a----       15.11.2019     15:04      107148800 {3d1e807c-9d45-4fef-9187-33cc9f92ab3d}.vhd
-a----       15.11.2019     14:39      264786944 {3dcd5520-9ef2-41a6-a645-454533cb5718}.vhd
-a----       14.11.2019     22:13     1594705920 {42c71f88-97fb-4230-aa3e-ef8fc58a7943}.vhd
-a----       16.11.2019     11:50     2800549376 {430acc34-05d8-4b33-b32a-42da0f172920}.vhd
-a----       14.11.2019     22:56      319012864 {45b260a2-612c-447d-9a06-a59b3c7c9bf0}.vhd
-a----       14.11.2019     19:57       42434560 {477e705f-3880-4362-a8b0-ad58d1d13f70}.vhd
-a----       15.11.2019     12:55      543776256 {489553bd-010c-4804-bffd-7bb9d032c1ac}.vhd
-a----       15.11.2019     12:55       44532224 {494dda1c-5add-4d5a-ab9e-3f4def65c1a3}.vhd
-a----       14.11.2019     20:23     5806815232 {4c65369f-75d7-49ab-a7e6-e8c2d7bf73d1}.vhd
-a----       14.11.2019     22:13      111657472 {52958033-7b09-4941-a5ae-6dbde0dd4fd9}.vhd
-a----       14.11.2019     20:33       75997184 {55967f09-a41e-47cf-8372-2b813acd4d15}.vhd
-a----       14.11.2019     18:51       17262592 {5a17de32-1cd7-41b1-a83b-aadfe5acdaf5}.vhd
-a----       15.11.2019     15:54       15164928 {5b2c5a25-0468-458c-9fdb-10bb2781806f}.vhd
-a----       14.11.2019     21:52     4030093824 {5b48c320-b1a6-430b-b574-21dec64c2609}.vhd
-a----       14.11.2019     20:33         481280 {5e14ffe1-72ca-42f9-b1fd-a6033f18e40f}.vhd
-a----       16.11.2019     11:50     1330400256 {5fda78af-809b-495d-98e8-78d2d4a3ad72}.vhd
-a----       14.11.2019     22:13       13067264 {6022e1be-c111-44aa-8897-f3e25f63c417}.vhd
-a----       15.11.2019     12:55     7568539648 {60f2f93e-86c6-4a0d-a562-acfec3f0f2a3}.vhd
-a----       15.11.2019     00:03     1120320512 {63f65003-0641-4afd-bcb3-ac48034beeaa}.vhd
-a----       14.11.2019     19:57      235106304 {658c2bf4-3bb2-4e8e-a8eb-c22a0d185c18}.vhd
-a----       15.11.2019     15:32      277372928 {65b8ce4f-7430-4308-a9a4-4bd69a501ee9}.vhd
-a----       14.11.2019     21:45       17262592 {684d1b45-2c17-4d0d-ada3-5e89a86c395b}.vhd
-a----       15.11.2019     15:32     1030120960 {69b71fcf-d02c-49c8-a9cc-d2c4a329e30e}.vhd
-a----       14.11.2019     20:48        8871936 {6a617d1f-987c-4d3d-be82-5dd92307be8b}.vhd
-a----       14.11.2019     22:56     4315376128 {6a9df076-7fd4-4bc1-bacb-8e7cc9425bf6}.vhd
-a----       15.11.2019     15:54       81976832 {70dd273a-db6b-4322-836e-11d2e6cec188}.vhd
-a----       15.11.2019     15:32    10195128320 {73280744-e67d-4b08-984e-5ededacaea45}.vhd
-a----       14.11.2019     19:57    10849599488 {73c43094-7c1f-4ad6-b33b-8568b74fcf7a}.vhd
-a----       15.11.2019     14:39    14927458304 {73eed7b0-4baa-4712-8243-a88306cfdb20}.vhd
-a----       14.11.2019     20:48        8871936 {76504f7a-c69b-45fb-9e36-361390954103}.vhd
-a----       15.11.2019     17:37      696592384 {7679b3c7-9689-46ce-8f7d-23ceb569a746}.vhd
-a----       14.11.2019     21:52      101169152 {78c2c14c-4ca4-45cb-a26d-20506e4aef99}.vhd
-a----       14.11.2019     18:51       15164928 {79d66d1c-742a-4718-823e-7b75b99299d6}.vhd
-a----       14.11.2019     20:48     2756811776 {7c88b589-547b-4904-bdc1-a8db32a55e73}.vhd
-a----       15.11.2019     15:32        8871936 {83746114-ff5d-4d41-9e7d-1502331bdb0f}.vhd
-a----       15.11.2019     17:37      485041664 {8452ff90-feb3-4058-bae2-df65fb43db26}.vhd
-a----       15.11.2019     14:39       23555584 {84d573ec-ddc4-456f-bee2-3d48fef31a96}.vhd
-a----       14.11.2019     20:33         481280 {85c24e59-0355-4c16-a0ad-f6a2221029dd}.vhd
-a----       15.11.2019     21:03    18610956288 {85c59a68-6586-455c-af03-f550a545562f}.vhd
-a----       14.11.2019     23:14       96973824 {8b032576-5501-4891-9ed7-f554daff888b}.vhd
-a----       14.11.2019     23:04     3574900736 {8b2b50fb-0a4d-4714-8ae8-6740ccfbbb74}.vhd
-a----       15.11.2019     00:03       57118208 {8d22b2c1-5598-465b-bad9-1122b2cf1e4d}.vhd
-a----       14.11.2019     22:39        8871936 {96818282-0485-4285-ab17-dd8d920ebedd}.vhd
-a----       15.11.2019     12:55    18428459520 {98128cc3-a362-4321-8c67-68f4a7e4c64e}.vhd
-a----       15.11.2019     17:37     4879647744 {a0f5cb0e-52f8-42d5-bfc2-ae32e2b6583d}.vhd
-a----       14.11.2019     22:56      138927104 {a36610a2-eb8c-4788-97b6-0d592b7287db}.vhd
-a----       14.11.2019     22:39       13067264 {a3f2c7ab-ab50-4f06-a730-401d66bccb38}.vhd
-a----       15.11.2019     14:39     1262961664 {a72abc65-bf48-4a08-b309-b161c56df4ae}.vhd
-a----       14.11.2019     21:45     5169125376 {a95a2127-4806-40ba-8454-eb7e83104cc2}.vhd
-a----       14.11.2019     21:52        8871936 {ae8e2767-4127-45c3-9408-9ad8ef03517d}.vhd
-a----       14.11.2019     23:14        8871936 {b021cd95-c61e-48ef-bf87-b195e24e039f}.vhd
-a----       14.11.2019     22:39       61000192 {b05c0ecd-37cf-407c-8304-faa60714a8ca}.vhd
-a----       15.11.2019     15:54       15164928 {b087dba1-d78a-4085-8957-a9a75e5ff1b4}.vhd
-a----       15.11.2019     15:32        8871936 {b2f60c25-08f9-451c-90b0-94fde381f646}.vhd
-a----       15.11.2019     14:39       21457920 {b3fa2258-a759-4166-b468-51f65f6a65b2}.vhd
-a----       15.11.2019     16:40       17262592 {b9211b6c-f8cd-45e4-a184-a2098624f549}.vhd
-a----       15.11.2019     17:37         481280 {bb795464-52b1-45d0-9b11-b9ffdcff2148}.vhd
-a----       15.11.2019     15:04        8871936 {bc43d5b9-1e7a-4bd5-a91e-ad5022d714cc}.vhd
-a----       15.11.2019     15:54      157806080 {befb1d9c-59a1-47a0-981f-137973445cfa}.vhd
-a----       15.11.2019     00:03       42434560 {bffad490-6a3c-4a6a-84ee-8efd5f87bd3b}.vhd
-a----       14.11.2019     22:13       13067264 {c15e3743-b46a-4bad-9487-90eae5fcd574}.vhd
-a----       14.11.2019     20:33         167936 {c5207262-928b-455f-b4d9-2d272e91738f}.vhd
-a----       15.11.2019     17:37         481280 {c8a2c7bb-da27-48a7-84ed-84bf1531fdee}.vhd
-a----       14.11.2019     20:23       36141568 {c8b4ed7a-18fa-4a79-85e7-da17f32fe121}.vhd
-a----       14.11.2019     21:33     5322254848 {cc0cfcf7-19cf-4d71-a472-3c1c4ae27f16}.vhd
-a----       14.11.2019     21:52        8871936 {cca981c8-2d49-4822-aaa0-738b0ab66ba8}.vhd
-a----       14.11.2019     21:45      100855808 {cdce8fde-3dec-46c8-953b-aa137942ec84}.vhd
-a----       14.11.2019     21:33     1844014592 {d094f540-1f6f-435a-8b47-c4fc52d1a077}.vhd
-a----       14.11.2019     22:56       15164928 {d44bba96-0e6d-4bd1-9c8d-10fe728b6940}.vhd
-a----       15.11.2019     00:03    14942141952 {d6179fb1-be06-49d5-8481-3841623a27c3}.vhd
-a----       14.11.2019     19:57       21457920 {d6f10e6e-7d09-476e-b0c8-a39a5cc65fbe}.vhd
-a----       15.11.2019     16:40       17262592 {d74cc7c7-b410-49f8-96d6-da9dcba5c5da}.vhd
-a----       15.11.2019     15:04     1785593344 {d9792826-8502-4012-9f27-8b9894a58c24}.vhd
-a----       15.11.2019     21:03       25653248 {df0b0136-5a3d-4b01-801b-79ed92be0bb1}.vhd
-a----       15.11.2019     00:03      128438784 {e36d126e-042d-4473-b520-1f0b6920f90e}.vhd
-a----       14.11.2019     21:33       17262592 {e8a24b73-d72b-4261-92cc-e27d1027a6a8}.vhd
-a----       14.11.2019     21:33      172489728 {e99f1482-2fd3-4d9d-a64f-8c6e236e3190}.vhd
-a----       14.11.2019     23:04       99071488 {eb77128f-643e-4d0d-a9e2-cd747dd1713e}.vhd
-a----       14.11.2019     21:45       15164928 {ecafc2ea-e3d9-45c1-829d-0983cbe35ea7}.vhd
-a----       15.11.2019     21:03       23555584 {ee737c31-bb84-43e7-a0ff-6aabfe2d19c3}.vhd
-a----       14.11.2019     22:39        8871936 {ee8352e0-ed4e-4743-b895-b2ca32bf5b37}.vhd
-a----       15.11.2019     16:40      340302848 {f07f5078-93c1-45d4-844e-a1ce8620bd52}.vhd
-a----       14.11.2019     21:45      130536448 {f2d65fae-b735-41a2-b029-0e348836a3ec}.vhd
-a----       14.11.2019     23:04        8871936 {fa989421-cdeb-45a0-bd71-0c5a9ab983f6}.vhd
-a----       14.11.2019     21:52       86172160 {ffa4035b-12cb-4828-81e8-0c7c1add7658}.vhd
-a----       14.11.2019     20:48      335794176 {fff9d5ef-905c-45ea-99ee-b01a83b70d48}.vhd

PS C:\Users\floogy>
floogy
Posts: 15
Joined: 16. Nov 2019, 13:06

Re: Handling of escape chars with VBoxManage in PowerShell

Post by floogy »

Okay. It seems, that the <UUID> or <snapname> isn't represented by their filenames. Therefore simply the uuid was wrong(?)

But maybe it would be rather helpful, to answer my question regarding handling formats, escaping, chars and so on ...

Code: Select all

PS C:\Users\floogy> .\VBoxManage snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  list
   Name: Sicherungspunkt 1 (UUID: 9d8632e5-fe56-4279-993f-971511c29cd8)
      Name: Sicherungspunkt 2 (UUID: f9abc572-99f0-4a40-a532-3ab3688504f5)
      Description:
Nach AHCI ICH8, vor Avira
         Name: Sicherungspunkt 3 (UUID: fcc5c5a1-6727-4830-9b33-b304bb3dbf69)
         Description:
vor Avast
            Name: Sicherungspunkt 4 (UUID: eb5bb812-27b1-4105-b740-58a58a8d2742)
               Name: Sicherungspunkt 5 (UUID: d247a4b3-ffb6-4cc8-8fd7-6d9fc5a2d676)
               Description:
Ressourcen
                  Name: Sicherungspunkt 6 (UUID: dfaef766-51d7-41b3-89c7-1ec9c7a0c150)
                     Name: Sicherungspunkt 7 (UUID: 535786f0-600d-4271-8a6d-514a60278e53)
                     Description:
pre Sido
                        Name: Sicherungspunkt 8 (UUID: e06e8c79-b10f-46df-a56f-c17c135ec585)
                        Description:
Snappy
                           Name: Sicherungspunkt 9 (UUID: 9664c09d-68c3-4dee-a81b-b1529bd1db98)
                           Description:
Crash nach Snapy Realtek Audio AC'97 nicht gewählt
                              Name: Sicherungspunkt 10 (UUID: 8bd73745-68d6-4f09-8ef4-9fc0572864d3)
                              Description:
USB Human Interface Devices (HID) USB\VID_80EE&PID_0021\5&18F54CB7&0&1
                                 Name: Sicherungspunkt 11 (UUID: 14c9aa30-2082-4ca3-b607-caab4d36b429)
                                 Description:
Snappy again
                                    Name: Sicherungspunkt 12 (UUID: 12a59bb1-74b4-4691-be73-62fc1bc10870)
                                    Description:
snappy driver again AC97
                                       Name: Sicherungspunkt 13 (UUID: e6a27d80-b838-47a3-8df8-2e969f000220)
                                          Name: Sicherungspunkt 14 (UUID: 71ac4a23-d8cb-4e77-afd2-e256f41e08e5)
                                             Name: Sicherungspunkt 15 (UUID: 589b1929-7b61-470d-aeb0-152db2619801)
                                             Description:
Pre: USB Controller reinstall
                                                Name: Sicherungspunkt 16 (UUID: 8d099d24-8871-47fe-b36b-8125c8ed6380)
                                                   Name: Sicherungspunkt 17 (UUID: a3b46928-900c-4052-83fa-bd4d776ca7e4)
                                                   Description:
freeze
                                                      Name: Sicherungspunkt 18 (UUID: 85e39791-2f98-4e05-8630-fd05e4b2dbfa)
                                                      Description:
Uptodate 20191115
                                                         Name: Sicherungspunkt 19 (UUID: 69dd2af4-e2fe-45fe-bfa5-c8e54a238876)
                                                         Description:
Alles ok
                                                            Name: Sicherungspunkt 20 (UUID: e8325a88-89a7-4674-8f02-a27058a6aef8)
                                                            Description:
Browser maxton, k-melon, firefox esr
                                                               Name: Sicherungspunkt 21 (UUID: 48f849f4-20af-4991-aec5-21568ddac3aa)
                                                               Description:
KB4012598 Security Fix for Windows x64
MS17-010 WannaCry Ransomware Fix for smb
CVE
                                                                  Name: Sicherungspunkt 22 (UUID: e890d263-f12f-4bea-a557-582beff89686)
                                                                  Description:
Alles ok, Firefox ESR nicht verwenden, Keine Viren, SMB gegen Wanna Cry gefixt
                                                                     Name: Sicherungspunkt 23 (UUID: adabf9d2-12ba-4919-a04d-ae371dba3b59)
                                                                     Description:
Alles ok
                                                                        Name: Sicherungspunkt 24 (UUID: f00937aa-5930-4743-92fe-0c5c3d5f1d24) *
PS C:\Users\floogy> .\VBoxManage snapshot "Windows XP x64 Edition (IDE) Einzelne vhd drives"  showvminfo "{f00937aa-5930-4743-92fe-0c5c3d5f1d24}"
Name:                        Windows XP x64 Edition (IDE) Einzelne vhd drives
Groups:                      /
Guest OS:                    Windows XP (64-bit)
UUID:                        7bac836a-1b5a-47c4-b7fc-8ae6f075e4f0
Config file:                 C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Windows XP x64 Edition (IDE) Einzelne vhd drives.vbox
Snapshot folder:             C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots
Log folder:                  C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Logs
Hardware UUID:               7bac836a-1b5a-47c4-b7fc-8ae6f075e4f0
Memory size                  6000MB
Page Fusion:                 disabled
VRAM size:                   18MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              1
PAE:                         disabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      disabled
Nested VT-x/AMD-V:           disabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              message and menu
Boot Device 1:               Floppy
Boot Device 2:               DVD
Boot Device 3:               HardDisk
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         local time
Hardw. virt.ext:             enabled
Nested Paging:               enabled
Large Pages:                 enabled
VT-x VPID:                   enabled
VT-x unr. exec.:             enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   None
State:                       powered off (since 2019-11-16T10:50:23.860000000)
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:
Teleporter Password:
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      6
Storage Controller Bootable (1):        on
IDE (0, 0): C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso (UUID: 39d01696-2de6-4272-8bc8-0cc8836273ca)
IDE (0, 1): C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots\{85c59a68-6586-455c-af03-f550a545562f}.vhd (UUID: 85c59a68-6586-455c-af03-f550a545562f)
IDE (1, 0): C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots\{2af5ca08-3f0e-41a8-8492-6f7fce3a010d}.vhd (UUID: 2af5ca08-3f0e-41a8-8492-6f7fce3a010d)
IDE (1, 1): C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots/{ee737c31-bb84-43e7-a0ff-6aabfe2d19c3}.vhd (UUID: ee737c31-bb84-43e7-a0ff-6aabfe2d19c3)
SATA (0, 0): Empty
SATA (1, 0): C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots/{df0b0136-5a3d-4b01-801b-79ed92be0bb1}.vhd (UUID: df0b0136-5a3d-4b01-801b-79ed92be0bb1)
SATA (2, 0): C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Snapshots/{3cb942fa-d30c-4a32-b981-fc41e3c54317}.vhd (UUID: 3cb942fa-d30c-4a32-b981-fc41e3c54317)
NIC 1:                       MAC: 0800277F671F, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:                       disabled
NIC 3:                       disabled
NIC 4:                       disabled
NIC 5:                       disabled
NIC 6:                       disabled
NIC 7:                       disabled
NIC 8:                       disabled
Pointing Device:             USB Tablet
Keyboard Device:             PS/2 Keyboard
UART 1:                      disabled
UART 2:                      disabled
UART 3:                      disabled
UART 4:                      disabled
LPT 1:                       disabled
LPT 2:                       disabled
Audio:                       enabled (Driver: DSOUND, Controller: AC97, Codec: STAC9700)
Audio playback:              enabled
Audio capture:               disabled
Clipboard Mode:              Bidirectional
Drag and drop Mode:          Bidirectional
VRDE:                        disabled
OHCI USB:                    enabled
EHCI USB:                    enabled
xHCI USB:                    disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:

Name: 'winxp', Host path: 'E:\winxp' (machine mapping), writable, auto-mount

Capturing:                   not active
Capture audio:               not active
Capture screens:             0
Capture file:                C:\Users\floogy\VirtualBox VMs\Windows XP x64 Edition (IDE) Einzelne vhd drives\Windows XP x64 Edition (IDE) Einzelne vhd drives.webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:

Guest:

Configured memory balloon size: 0MB

Snapshots:

   Name: Sicherungspunkt 1 (UUID: 9d8632e5-fe56-4279-993f-971511c29cd8)
      Name: Sicherungspunkt 2 (UUID: f9abc572-99f0-4a40-a532-3ab3688504f5)
      Description:
Nach AHCI ICH8, vor Avira
         Name: Sicherungspunkt 3 (UUID: fcc5c5a1-6727-4830-9b33-b304bb3dbf69)
         Description:
vor Avast
            Name: Sicherungspunkt 4 (UUID: eb5bb812-27b1-4105-b740-58a58a8d2742)
               Name: Sicherungspunkt 5 (UUID: d247a4b3-ffb6-4cc8-8fd7-6d9fc5a2d676)
               Description:
Ressourcen
                  Name: Sicherungspunkt 6 (UUID: dfaef766-51d7-41b3-89c7-1ec9c7a0c150)
                     Name: Sicherungspunkt 7 (UUID: 535786f0-600d-4271-8a6d-514a60278e53)
                     Description:
pre Sido
                        Name: Sicherungspunkt 8 (UUID: e06e8c79-b10f-46df-a56f-c17c135ec585)
                        Description:
Snappy
                           Name: Sicherungspunkt 9 (UUID: 9664c09d-68c3-4dee-a81b-b1529bd1db98)
                           Description:
Crash nach Snapy Realtek Audio AC'97 nicht gewählt
                              Name: Sicherungspunkt 10 (UUID: 8bd73745-68d6-4f09-8ef4-9fc0572864d3)
                              Description:
USB Human Interface Devices (HID) USB\VID_80EE&PID_0021\5&18F54CB7&0&1
                                 Name: Sicherungspunkt 11 (UUID: 14c9aa30-2082-4ca3-b607-caab4d36b429)
                                 Description:
Snappy again
                                    Name: Sicherungspunkt 12 (UUID: 12a59bb1-74b4-4691-be73-62fc1bc10870)
                                    Description:
snappy driver again AC97
                                       Name: Sicherungspunkt 13 (UUID: e6a27d80-b838-47a3-8df8-2e969f000220)
                                          Name: Sicherungspunkt 14 (UUID: 71ac4a23-d8cb-4e77-afd2-e256f41e08e5)
                                             Name: Sicherungspunkt 15 (UUID: 589b1929-7b61-470d-aeb0-152db2619801)
                                             Description:
Pre: USB Controller reinstall
                                                Name: Sicherungspunkt 16 (UUID: 8d099d24-8871-47fe-b36b-8125c8ed6380)
                                                   Name: Sicherungspunkt 17 (UUID: a3b46928-900c-4052-83fa-bd4d776ca7e4)
                                                   Description:
freeze
                                                      Name: Sicherungspunkt 18 (UUID: 85e39791-2f98-4e05-8630-fd05e4b2dbfa)
                                                      Description:
Uptodate 20191115
                                                         Name: Sicherungspunkt 19 (UUID: 69dd2af4-e2fe-45fe-bfa5-c8e54a238876)
                                                         Description:
Alles ok
                                                            Name: Sicherungspunkt 20 (UUID: e8325a88-89a7-4674-8f02-a27058a6aef8)
                                                            Description:
Browser maxton, k-melon, firefox esr
                                                               Name: Sicherungspunkt 21 (UUID: 48f849f4-20af-4991-aec5-21568ddac3aa)
                                                               Description:
KB4012598 Security Fix for Windows x64
MS17-010 WannaCry Ransomware Fix for smb
CVE
                                                                  Name: Sicherungspunkt 22 (UUID: e890d263-f12f-4bea-a557-582beff89686)
                                                                  Description:
Alles ok, Firefox ESR nicht verwenden, Keine Viren, SMB gegen Wanna Cry gefixt
                                                                     Name: Sicherungspunkt 23 (UUID: adabf9d2-12ba-4919-a04d-ae371dba3b59)
                                                                     Description:
Alles ok
                                                                        Name: Sicherungspunkt 24 (UUID: f00937aa-5930-4743-92fe-0c5c3d5f1d24) *

PS C:\Users\floogy>
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Handling of escape chars with VBoxManage in PowerShell

Post by socratis »

floogy wrote:how to escape e.g. spaces and special chars in pathnames
Just enclose the parameters in double quotes, problem solved. Example:
$ VBoxManage snapshot "Fedora 29" list
   Name: 6.0.5-2019.04.11 (UUID: e15a6403-9c6c-4fa0-8fb0-b9c0b3b97dd5) *
$ VBoxManage snapshot "Fedora 29" showvminfo "e15a6403-9c6c-4fa0-8fb0-b9c0b3b97dd5"
Name:                        Fedora 29
Groups:                      /
Guest OS:                    Fedora (64-bit)
UUID:                        cee1fc0e-49d0-4a85-9065-c1fa4f6f464f
Config file:                 /Users/Shared/VirtualBox/Machines/Fedora 29/Fedora 29.vbox
Snapshot folder:             /Users/Shared/VirtualBox/Machines/Fedora 29/Snapshots
Log folder:                  /Users/Shared/VirtualBox/Machines/Fedora 29/Logs
Hardware UUID:               cee1fc0e-49d0-4a85-9065-c1fa4f6f464f
[...]
The rest of the examples you have in your post are part misunderstanding of the proper command syntax, and part wrong parameters given. I'm not going to go through each and every bad command given, just pay closer attention to the syntax of each and every command.

BTW, I changed the title of your thread from "General use of vboxmanage e.g. in powershell Context: "FindSnapshot(Bstr(a->argv[2]).raw(), pSna" to something more meaningful...

PS. Friendly advice; reduce (seriously) the number of snapshots that you have! Nothing good can come out of having 24 snapshots, if one of them breaks, you're in really big trouble, see Snapshot basics to understand the fragile status of your VM as is...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
floogy
Posts: 15
Joined: 16. Nov 2019, 13:06

Re: Handling of escape chars with VBoxManage in PowerShell

Post by floogy »

Ah, thank you for your reply! I didn't assume, that, if one snapshot will fail by a bit change, than everything might be lost. I was oppositional thinking that it was the other way around to make it more secure. Okay, so I'll try to reduce the snapshots by the right commands (to be find) with vbox manage (hopefully). Okay snapshots doesn't replace backups, I guess.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Handling of escape chars with VBoxManage in PowerShell

Post by socratis »

floogy wrote:I was oppositional thinking that it was the other way around to make it more secure.
floogy wrote:snapshots doesn't replace backups
Snapshots are not backups (that's a tad more accurate), especially when you realize that the snapshots record sector changes and not file changes.
floogy wrote:I'll try to reduce the snapshots by the right commands (to be find) with vbox manage (hopefully)
You have no GUI, no VirtualBox Manager? Because that makes it a lot more tedious and error-prone, and you need to be extra careful!

Make a backup in any case!
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
floogy
Posts: 15
Joined: 16. Nov 2019, 13:06

Re: Handling of escape chars with VBoxManage in PowerShell

Post by floogy »

What happens if I delete older Snapshots? Would they merge differentialy into the lasting Snapshots? I think they are created incremental.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Handling of escape chars with VBoxManage in PowerShell

Post by socratis »

floogy wrote:What happens if I delete older Snapshots?
I would suggest creating a throw-away VM and start experimenting. The general idea is that if you delete "Snapshot N" the content differences end up in "Snapshot N+1", which might be the "Current State". I usually start deleting from the last snapshot, and all the changes are merged into the "Current State (changed)".

Mind you, the bigger the snapshot, the more time it's going to take for the merge operation. It's not an instantaneous procedure, it might look like it's stuck but it's not, let it finish. And manage to have plenty of free space on the host, I'd say 2*Maximum_VDI_size...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply