I was testing your backup script, Found an older version on the Powershellcripts site. This was working with no error.
I downloaded the version on Github (22.03.26) and now i get an error. The script continues running and it looks like it backups ok.
Situation:
Testserver with Hyperv and 2 VM's for testing
Running the script with right mouse > Run with powershell
Backup path is d:\backup.
This is what i get:
**** Running with the following config *****.
Utility Version:.........22.03.26
Hostname:................TESTLAB-HV01.
Windows Version:.........10.0.17763.
VMs to backup:...........
.........................VM1-FS
.........................VM2-DB
Backup directory:........d:\backup.
Working directory:.......d:\backup.
Backups to keep:.........No Config
Logs directory:..........No Config
E-mail log to:...........No Config
E-mail log from:.........No Config
E-mail subject:..........Default
SMTP server:.............No Config
SMTP Port:...............Default
SMTP user:...............No Config
SMTP pwd file:...........No Config
-UseSSL switch:..........False.
-NoPerms switch:.........False.
-ShortDate switch:.......False.
-Compress switch:........False.
-Sz switch:..............False.
7-zip Options:...........Default.
2022-06-01 14:07:28 [INFO] Process started.
2022-06-01 14:07:28 [INFO] (VM:VM1-FS) Attempting to export VM
2022-06-01 14:08:41 [INFO] (VM:VM1-FS) Removing previous backups
Directory: D:\backup
Mode LastWriteTime Length Name
d----- 1-6-2022 14:03 VM1-FS-2022-06-01_14-04-07
Out-File : Cannot bind argument to parameter 'FilePath' because it is null.
At C:\scripts\Hyper-V-Backup.ps1:292 char:181
I was testing your backup script, Found an older version on the Powershellcripts site. This was working with no error. I downloaded the version on Github (22.03.26) and now i get an error. The script continues running and it looks like it backups ok.
Situation:
This is what i get:
**** Running with the following config *****. Utility Version:.........22.03.26 Hostname:................TESTLAB-HV01. Windows Version:.........10.0.17763. VMs to backup:........... .........................VM1-FS .........................VM2-DB Backup directory:........d:\backup. Working directory:.......d:\backup. Backups to keep:.........No Config Logs directory:..........No Config E-mail log to:...........No Config E-mail log from:.........No Config E-mail subject:..........Default SMTP server:.............No Config SMTP Port:...............Default SMTP user:...............No Config SMTP pwd file:...........No Config -UseSSL switch:..........False. -NoPerms switch:.........False. -ShortDate switch:.......False. -Compress switch:........False. -Sz switch:..............False. 7-zip Options:...........Default.
2022-06-01 14:07:28 [INFO] Process started. 2022-06-01 14:07:28 [INFO] (VM:VM1-FS) Attempting to export VM 2022-06-01 14:08:41 [INFO] (VM:VM1-FS) Removing previous backups
Mode LastWriteTime Length Name
d----- 1-6-2022 14:03 VM1-FS-2022-06-01_14-04-07 Out-File : Cannot bind argument to parameter 'FilePath' because it is null. At C:\scripts\Hyper-V-Backup.ps1:292 char:181