Task Scheduler Error “A specified logon session does not exist” – Fix via Command Line and PowerShell for Scripting

Task Scheduler Error “A specified logon session does not exist” – Fix via Command Line and PowerShell for Scripting

This is very know issue, if you search internet, you will get multiple blog post with same solution for this issue, and if you follow the steps, it actually resolve this issue. In simple word, solution of this problem is Logon to the faulty system. Open SECPOL.MSC from Run Go to Security Settings | Local Policies | Security Options Open

Set File System Auditing via PowerShell

Set File System Auditing via PowerShell

For last few days, I was trying to figure out how to set file system auditing via command line. I was looking for this as I had to apply some specific audit policy on multiple file servers. From GUI, we could do this, but it will take hours of manual activity. As requirement, I had to set Success Audit policy

NTFS Permission issue with TAKEOWN & ICACLS

NTFS Permission issue with TAKEOWN & ICACLS

Most of us using TAKEOWN or ICACLS for taking ownership from command prompt, and both of them are simple to use. We generally use TAKEOWN or ICACLS with following switches to taking the ownership. takeown /F “PATH” /R /D Y /A icacls “PATH” /T /setowner Administrators But unfortunately, TAKEOWN & ICACLS both might failed on certain scenario, as there are