Hi,
I'm attempting to replace my certutil commands used when setting up AD CS with their PowerShell CMDlet equivalents - I am using Windows Server 2012 R2.
One problem I have is with the database backup command, normally I would run:
- certutil -BackupDB -f C:\ADCSBackup > C:\ADCSBackup\ADCS-Backup-Log.txt
This executes correctly and creates a record of the output (I'm simplifying parameters here to make the problem description as clear as possible).
I try to run the PowerShell equivalent:
- Backup-CARoleService –Path C:\ADCSBackup –DatabaseOnly -verbose > C:\ADCSBackup\ADCS-Backup-Log.txt
The backup is successful, however, the log file it creates is zero bytes, i.e. the output hasn't actually been redirected to the file.
I also tried:
- Backup-CARoleService –Path C:\ADCSBackup –DatabaseOnly -verbose | Out-File C:\ADCSBackup\ADCS-Backup-Log.txt
This also creates the log file, but again has zero content.
I'm very much a PowerShell newbie so if anyone could advise where I'm going wrong I'd be very grateful.
Regards, Chipeater