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

  1. Logon to the faulty system.
  2. Open SECPOL.MSC from Run
  3. Go to Security Settings | Local Policies | Security Options
  4. Open Network access: Do not allow storage of passwords and credentials for network authentication
  5. To resolve this issue, simply set this policy to Disabled.

But, my problem is little bit different, I was working on a script to validate the Local Admin password of multiple remote systems, I found best way to validate this is to create a ONSTART task with local admin credentials with schtasks.exe via PS Remoting (WSMan). Something like this

If the scheduled task created successfully, it means the local admin account authenticating. Now the problem is, when I was trying to run this remotely on multiple Windows 2008 R2 servers, I am getting “A specified logon session does not exist” and my script reporting wrong status. Solution is already available, but who will made those changes on hundreds of servers manually, and I am also not sure why this policy was enabled. So I don’t want made any permanent changes on all the servers for validating local admin password.

What I did is, logged on to a problematic system, and extracted the local security policy configuration using this command
Continue reading

How to stop extracting/viewing users details from AD

There are several tools/script available for extracting all user information from AD. Any domain users can access this information by default.

For an example, using following attached .vbs script, we can dump entire AD users base to a excel file with following fields.

  ADExport Script (1.8 KiB, 342 hits)


Continue reading

Domain Tools v1.2 Final – For Delegating Users ID related Calls – Update


Previous Version:

http://technochat.in/2010/08/domain-tools-v1-0-for-delegating-users-id-related-calls/

Main Window

Configuration Window

Continue reading