Certificate is already installed on machine. Now I want to give read permission on PrivateKey of Certificate to application user.
As an alternate to above script. You can use PowerShell module. I have not tried it myself but module looks good. http://get-carbon.org/index.html
Here is command to set permissions http://get-carbon.org/Grant-Permission.html