I have created a powershell script to get Inactive users from AD with high cpu usage, but now I want to end the session of those Inactive users without disabling the account. I'm unable to get session Id of inactive users
Can anyone help me to end this inactive user sessions?
Do you mean by 'inactive user sessions', they are using remote desktop, and you want to log them off the ts / rdp session?
Here are links to PowerShell scripts to log people off RDP Sessions
Powershell command to kick disconnected users off a server
Powershell Log Off Remote Session