Powershell Unexpected Attribute When Inserting Script Between If Command

Powershell Unexpected Attribute When Inserting Script Between If Command