Thanks for reading, I'm working on something a bit outside my element and trying to write a powershell script that can install some SSL Certificates into some Veeam Products.
This works.
Add-PSSnapinVeeamPSSnapinConnect-VBRServer
$certificate =Get-VBRCloudGatewayCertificate-FromStore|WhereFriendlyName-like "*12/10/2019*"Add-VBRCloudGatewayCertificate-Certificate $certificateDisconnect-VBRServer
What I need though is a way for the -like "*12/10/2019*"
to be a variable that inserts today's date.
I've tried using a variable like this:
$date =Get-Date-Format"MM/dd/yyyy"
Then using
-like "*$date*"
I've tried something like this
-like "*(Get-Date -Format "MM/dd/yyyy")*"
Go easy on me I'm sure I'm missing something dumb and obvious but I'm not a programmer and my scripting skills are pretty minimal.
Thanks for taking a look and helping out.