In my previous post, I created test button on Login Screen changer GUI, when you clicked on them it lock your workstation.
I got few queries that which code I used behind the above Test button. I used the below code to lock the workstation.
$shell = New-Object -com "Wscript.Shell"
Just shoot the above code and when you paste the last line, you computer will be locked.
I found it cool! i hope you may also like it.