Unexpected token '}' in expression or statement PowerShell : <p>Hi I'm using a script for power shell this is part of it where the error is happening: it was working fine until i added the auto file naming by date so I guess the issue is here. any help is appreciated.</p>

<pre><code>  foreach ($web in $site.AllWebs)
  {
    #Write the Header to "Tab Separated Text File"
    "$($web.title) `t $($web.URL) `t  `t  `t `t " | out-file "c:\users_PermisionReport + (date -f yyyy-MM-dd) + "-DSR.csv" -append
     #Get all Groups and Iterate through   
     foreach ($group in $Web.groups)
     {
            "`t  `t $($Group.Name) `t   `t `t " | out-file "c:\users_PermisionReport + (date -f yyyy-MM-dd) + "-DSR.csv" -append
            #Iterate through Each User in the group
                   foreach ($user in $group.users)
                    {
                       #Exclude Built-in User Accounts
                if(($User.LoginName.ToLower() -ne "nt authority\authenticated users") -and ($User.LoginName.ToLower() -ne "sharepoint\system") -and ($User.LoginName.ToLower() -ne "nt authority\local service"))
                {
                            "`t  `t  `t  $($user.LoginName)  `t  $($user.name) `t  $($user.Email)" | out-file "c:\users_PermisionReport" + (date -f yyyy-MM-dd) + "-DSR.csv" -append 
}
}
}
}//Error is here.
</code></pre>

<p>#error message:</p>

<pre><code> Unexpected token '}' in expression or statement.
 CategoryInfo          : ParserError: (:) [], ParseException
 FullyQualifiedErrorId : UnexpectedToken
</code></pre>
