Script name - windows-create-snapshot-before-patching.ps1
Purpose: Create a snapshot in vCenter of a Windows machine before patching it.
Input: IP of the vCenter, username and password of vCenter
- The correct execution command is:
1.\@file @VCenterIP @VCenterUser @VCenterPassword
Output - describes the progress and mentions failures if any.
- Successful execution means that a new snapshot was created in VCenter.
- Please note that, if the password includes the character # the script will fail (# is interpreted as the beginning of a comment, so the rest of the password will be commented).
In the rare case of a password containing the # character, a workaround can be to instruct the user to enter a password ‘encircled with quotes’, i.e.:
- Password that does not work: #pass1234
- Password that works: ‘#pass1234’
The above is entered in the script parameters tab: