I am hoping someone can help me on this, I have a script that Removes and updates FSRM groups on windows server 2012-2019, I want to create a ps script that cycles through a text file, in each line it stores the value as a variable that can be used in the batch file.
here is my code below; I just can't think of where to go after this;
$BF = gc "C:\Installs\FSRM_SCRIPTS\FILESCREEN_EXPORT\FSRM_Groups.txt"
$env:FSRM_Group
$FS = Foreach($BT in $BF){
Start-Process "cmd.exe" "/c C:\INSTALLS\FSRM_SCRIPTS\FILESCREEN_EXPORT\New_Exports\Batch_Import.bat"
}
$FS | out-file "C:\Installs\FSRM_SCRIPTS\FILESCREEN_EXPORT\New_Exports\Results\$env:COMPUTERNAME - Import.txt"