Bhaskar Jayakrishnan | Jason,
The Backup-Ucs cmdlet is designed to substitute some variables like ${ucs} and DateTime format specifiers in the PathPattern with the corresponding values. If you use a double-quote, the variables will be interpreted by PowerShell. If you want to use a variable, you can do the following:
PS C:\> del C:\work\Backups\*.xml PS C:\> $myBackupPath="C:\work\Backups" PS C:\> Backup-Ucs -Type config-all -PathPattern ($myBackupPath + '\${ucs}-${yyyy}${MM}${dd}-config-all.xml')
AdminState : disabled Descr : Hostname : bjayakri-wxp201203281849 Job : immediate Name : PostAction : remove PreservePooledValues : no Proto : http Pwd : RemoteFile : C:\work\Backups\bgl-samc03-20120328-config-all.xml Type : config-all User : Dn : sys/backup-bjayakri-wxp201203281849 Rn : backup-bjayakri-wxp201203281849 Status : Ucs : bgl-samc03
PS C:\> dir C:\work\Backups
Directory: C:\work\Backups
Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 3/28/2012 6:49 PM 25665 bgl-samc03-20120328-config-all.xml
PS C:\>
PowerTool 0.9.7.0 was released yesterday and has a lot of interesting & useful additions. Give it a try.
Thanks, - bhaskar |
| Please sign in to flag this as inappropriate. |