I wrote a script which will search string on a remote server. I am facing small issue with this. It is not searching complete folder. It says "Select-String : The file \\servername\c$\abc\stats can not be read: Access to the path
'\\servername\c$\abc\stats' is denied."
You will want to avoid being the first to post a reply to your own post. A lot of us looks for topics with no replies every day, and yours won't appear on that list, which makes it less likely someone will reply to you.
You should test Get-ChildItem by itself with whatever path you are wanting it to operate against. As written, your command should be working, which means there may be a permissions or other problem. Working with just Get-ChildItem will make it easier to troubleshoot that.