Reputation: 71
I have the following batch script as variable in my powershell script.
$DataIntegrityCheck = @"
@ECHO OFF
SET SETTING_HOME=""
SET BACKUP_SET="ALL"
SET BACKUP_DEST="ALL"
SET CRC_MODE="DISABLE-CRC"
"@
How can I run this batch script?
Thank you in advance for any help.
Upvotes: 0
Views: 139
Reputation: 19664
You don't need to execute that in batch to set environment variables, just use the Environment
drive in powershell:
$Env:SETTING_HOME = '""'
$Env:BACKUP_SET = '"ALL"'
$Env:BACKUP_DEST = '"ALL"'
$Env:CRC_MODE = '"DISABLE-CRC"'
about_Environment_Provider
Upvotes: 2