I tried passing credentials to NSSM for setting up log-on credentials for windows service via PowerShell in which credentials included special charaters. Now these credentials containing special charaters are creating issue.
Special charaters include space, inverted comma, double inverted comma, etc
Exact command I tried -
.\nssm.exe set $ServiceName objectname $Username $Password
I more thing I already tried was to wrap variables in inverted comma but I was confused in creating escape sequence function:
.\nssm.exe set “”"$ServiceName""" objectname “”"$Username""" “”"$Password"""
Any approaches/idea are appreciated.