Scheduling renewal?

Thanks, but will my PowerShell script to import the certificates into RDS still work if its ran via task scheduler vs automatically from “within” CTW?

$pfxpath = $result.ManagedItem.CertificatePath
Import-Module RemoteDesktop
Set-RDCertificate -Role RDPublishing -ImportPath $pfxpath -Force
Set-RDCertificate -Role RDWebAcces -ImportPath $pfxpath -Force
Set-RDCertificate -Role RDGateway -ImportPath $pfxpath -Force
Set-RDCertificate -Role RDRedirector -ImportPath $pfxpath -Force