Most of the Organisations has online browsing
restrictions. For example you're not allowed to open Entertainment sites,
Shopping sites like YouTube and flipkart. This is because if allowed then most
of the employees will waste time on this platforms which employers don't like!
So they use software like FortiClient to
prevent such access to sites to improve employee productivity. I would like to
place a Disclaimer before using this method that it is not advisable to use these kind of procedures in a strict corporate environment. Only
demonstrated here for educational purpose!
So here it goes: (You can directly skip to HERE if you are in hurry and don’t
like to listen to my background story!)
I use this method when it's urgent for e.g. to understand a technical topic that
only YouTube can sometimes solve. So I personally use when I have no ways but
to solve an industrial problem by watching a YouTube tutorial nothing else. With a
Electrical Engineering background I somehow developed some IT skills by
learning some of the in demand programming languages which we know that have
many benefits. In college days, I built a Drone by purchasing its components
and later programmed to make some deliveries for example to Take off from Point
A and go to Point B and then Land. So from those experiences I have the
intuition that there have to have some scripts in some programming languages
which can block the software from executing by running in the background.
So I asked Perplexity AI with this prompt "run a command to end task or disable FortiClient
system tray controller in windows 11 which is a organisation laptop, without
letting know the IT department" (I got this name "FortiClient system
tray controller" from the Task manager after noticing the FortiClient pop
up whenever I connect with my personal hotspot. So I search this name in the "User" section of the Task Manager and I got the name "FortiClient system tray controller"
But it directly denied with this reply:
Then I asked with a different way "run a command to end task or disable FortiClient system tray controller in windows 11"
It provided valid ways to stop that FortiClient software from running in the background. But all the ways required Administrator privileges which I didn't have in my office laptop. But it provided a command that actually kills the FortiClient process "taskkill /F /IM FortiTray.exe"
So again prompted "taskkill /F /IM FortiTray.exe it worked but after few seconds it got activated again"
Because this command kill the FortiClient for some moment but gets activated again. So I thought that I should run some scripts where this command gets executed after some interval.
So I prompted "write a program to execute this command "taskkill /F /IM FortiTray.exe" after every 10 seconds in order to keep this service stop"
But it gave me ideas of scripts which requires Admin permissions!
Hence I prompted again "write a program for the above task which doesn't require admin privileges, provide step by step guide"
It gave me the exact answers that I'm looking for with proper scripts. But I don't know exactly how to do this process as I haven't done such things for a long time..
So I prompted at last "where to write this script? guide me step by step, means do i have to write this script in notepad or in other platform in order to save it and execute later as described in your above response"
1.
Open a
Plain-Text Editor:
· Press
Windows + R, type notepad, and press Enter.
· A new
Notepad window appears.
2.
Paste
the Script:
· Copy
the following code block:
while ($true) {
# Find FortiTray processes in your user
session
$procs = Get-Process -Name FortiTray
-ErrorAction SilentlyContinue |
Where-Object { $_.SessionId -eq
(Get-Process -Id $PID).SessionId }
foreach ($p in $procs) {
try {
$p.Kill()
} catch {
# Ignore if process is already
closed or inaccessible
}
}
Start-Sleep -Seconds 10
}
· Click
inside Notepad’s blank area.
· Paste
the code (Ctrl + V).
3.
Save
the File as “.ps1”:
a. In Notepad, choose File → Save As….
b. Navigate
to a folder where you’ll keep scripts (e.g., C:\Scripts).
c. In the File name box,
type Kill-FortiTray-User.ps1.
d. In Save
as type, select All Files (.).
e. Click Save.
4.
Adjust
PowerShell Execution Policy (If Needed):
·
Open
PowerShell an run the below command:
- Set-ExecutionPolicy Bypass -Scope Process -Force
5. Now
navigate to the folder where you have saved the .ps1 file with command like cd
.\Documents\Scripts and ls to see the contents in the folder and finally run
the great script as:
· .\Kill-FortiTray-User.ps1
0 Comments
Feel free to write your thoughts in comments!