如何根据PC时间更改日期? 例如:
$StorageUri = "https://strdatabasebackup.blob.core.windows.net/strdatabasebackupblob/(2018-01-09-07:00)dbdom_buin.bacpac";
如何使我要保存的文件自动更改日期而无需每天更改?
答案 0 :(得分:1)
将日期构建为变量format options here:
$dateVar = Get-Date -format s
然后从中构建$StorageUri
路径:
$StorageUri = "https://strdatabasebackup.blob.core.windows.net/strdatabasebackupblob/(" + $dateVar + ")dbdom_buin.bacpac"