Terminate all online users by code in MSD axapta

To Terminate all online users by code in axapta you can try following code.
Terminate all users