Sure. So the first line is how it is and the second is how i fixed it. Mostly has to do with double quotes and single quotes.
Not working:
"-windowstyle hidden -command `"if(((get-printer).computername -like `'$prntSvr`') -and ((get-printer).name -like `"*$fName*`")){exit 0};if(Test-Connection -ComputerName $prntSvr -BufferSize 16 -Count 1 -Quiet){Add-Printer -ConnectionName `"\\$prntSvr\$prntName`"}"
Working:
-windowstyle hidden -ExecutionPolicy Bypass -command "if(((get-printer).computername -like '$prntsvr') -and ((get-printer).name -like '*$fName*')){exit 0};if(Test-Connection -ComputerName $prntsvr -BufferSize 16 -Count 1 ){Add-Printer -ConnectionName '\\$prntsvr\prntName'}"
Looks like the whole if statement is in double quotes and all the variables are in both single and double quotes. There is a leading double quote that starts the line but it should start before the if, not before the arguments. Also, I put the variables under single quotes within the if statement. Once i ran the worklet, it created the task. I ran the task manually and the printer was added successfully.
I am working on tweeking the script to make it where it will run the task rather than making the user log out and back in.