Powershell to run Data Masking set via command line
Robb_Keller
Posts: 21 Bronze 1
in SQL Clone
I'm trying to run a Powershell script to run a data masking set. I have the following and noted the documentation did not have the path to the command line tool listed as the present naming:
& "C:\Program Files\Red Gate\Data Masker for SQL Server 6\DataMaskerCmdLine.exe" "F:\TFS\DBA\Data Masking - Obfuscation\Redgate Masking Sets\BO_TablesMasking.DMSSet" -R -D "RobbKW-10\Robb[appdev_bo] = RobbKW-10\Robb[demo]" -X | out-null
The script runs, but nothing happens. It does not seem to be running the masking set.
Anybody?
Thanks,
Robb
& "C:\Program Files\Red Gate\Data Masker for SQL Server 6\DataMaskerCmdLine.exe" "F:\TFS\DBA\Data Masking - Obfuscation\Redgate Masking Sets\BO_TablesMasking.DMSSet" -R -D "RobbKW-10\Robb[appdev_bo] = RobbKW-10\Robb[demo]" -X | out-null
The script runs, but nothing happens. It does not seem to be running the masking set.
Anybody?
Thanks,
Robb
Tagged:
Best Answer
-
PlantBasedSQL Posts: 187 Gold 4Thanks for your post @Robb_Keller
There is a difference between the DataMasker.exe and the DataMaskerCMDLine.exe - the former will accept the substitution of the connection string and you can specify multiple cmdline args, however the latter, which you are trying to use accepts only 1 parameter, the PARFILE.
It is specified in more detail here: https://documentation.red-gate.com/dms6/data-masker-help/version-6-tech-tips/running-data-masker-from-the-command-line
Let me know if you need any further information or if you have other questions - thank you very much.
Answers
Robb
Robb