You should first access the file using Get-Item to encrypt a file with EFS:
$file = Get-Item c:\somefile.txt
Next, call its Encrypt() method. Provided that EFS is available on your system, the file will be encrypted, and in Windows Explorer, the file will now get a green label:
$file.Encrypt()
You should use
$file.Decrypt()
to undo encryption.