Garia.Net
Administrator tools for admins by admins
- G-Scan: Hey look mom im on TV. (Admin, 2 days ago)
Tools
G-Scan Fast disk analysis tool for admins 1.14.0 799 KB
Overview
2.8 s
a full scan of a 1.82 TB drive
1,376,677
files read straight from the MFT
0.23%
from what Windows itself reports
799 KB
one executable, no runtime, no install needed
G-Scan is built for speed: it reads a whole NTFS drive straight from its master file table instead of asking Windows for folder listings. Use it the way the job asks for, on the machine in front of you or one across the network.
| Interface | A web page on your own machine. Nothing is scanned until you choose a target. |
| Command line | gscan.com --scan C:\ --out c.json scans, writes JSON or CSV and exits with a code, for scripts and RMMs. gscan.exe "D:\data" opens the page on a scan; --server, --agent and --show-key do the rest. |
| Service | The agent runs as a Windows service. Open any machine that has it from your browser. |
| API | Every button is one HTTP call with JSON, for automation and third-party tools. |
| Deployment | An MSI with real properties for SCCM, Intune, GPO and NinjaOne, and ready-made NinjaOne scripts for a disk report, a low-space alert and CSV exports. |
Scans disks, folders, WSL, network shares and Linux over SSH
C:\ D:\data WSL \\SERVER\C$ \\NAS\share user@host:/path
What you get
| Advice | What can go, with the gigabytes attached, and what to leave alone. |
| Explorer | Two panes, like Windows Explorer: a folder tree, and the contents of the open folder by size with each item’s share. Every folder level has its own colour on both sides. Driven by the keyboard. |
| Duplicates | In one scan or several: choose the kind of file and the smallest size, same name or content alone. Confirmed by reading the files. |
| File types | Which kinds of file take the space. |
| Export | File types, files and advice as CSV from the page, or the whole result as JSON or CSV from the command line. |
| Map | A zoomable treemap. |
| Delete | Recycle Bin by default, system paths refused, everything logged. |
Without administrator rights it walks folders at about 175,000 files a second and reports what it could not read, instead of quietly showing less.
Examples
Scan a folder right away
gscan.exe "D:\data"
Hand it to a user without installing anything
Copy gscan.exe to their machine and let them start it. As a standard user it walks folders and reports the part it could not read; one click on Restart as administrator switches to turbo mode.
One install for the whole team, on a jump host
gscan.exe --server --token <key> --port 8443
Anyone on the network opens http://jumphost:8443/, enters the key once, and scans the host’s disks, any \\SERVER\C$, any NAS share and any Linux host, several at the same time. G-Scan does no TLS itself: keep it on a management network or put a reverse proxy in front.
An agent on a server you check every week
gscan.exe --agent --port 7777
gscan.exe --show-key
Export the file types of a folder to CSV
$gscan = "$env:ProgramFiles\GariaNetTools\G-Scan\gscan.com"
& $gscan --scan D:\data --out types.csv --what types
In a script or an RMM: scan, read the result, act on the exit code
[Console]::OutputEncoding = [Text.Encoding]::UTF8
$r = (& $gscan --scan C:\ --out -) -join "`n" | ConvertFrom-Json
if ($LASTEXITCODE -ne 0) { exit 1 }
$r.advice | Select-Object code, bytes
Use gscan.com, not gscan.exe: PowerShell does not wait for a program without a console. Exit code 0 is done, 1 the scan or writing failed (the reason is on standard error), 2 wrong arguments. The JSON is what /api/result returns, the CSV what /api/export returns.
Read the agent key straight into a script
$key = & "C:\Program Files\GariaNetTools\G-Scan\gscan.exe" --show-key
Install (MSI)
Install options
An MSI with real properties, so it goes out through SCCM, Intune, GPO or NinjaOne without a wrapper script. Double-clicked it is a wizard; with /qn only the properties count. Per-machine, 64-bit, and uninstalling removes the service, the firewall rule, the shortcuts, the context menu and the registry keys.
msiexec /i G-Scan-1.14.0-x64.msi /qn
msiexec /x G-Scan-1.14.0-x64.msi /qn
| Property | Default | Meaning |
|---|---|---|
| INSTALLFOLDER | %ProgramFiles%\GariaNetTools\G-Scan | Install location |
| UIPORT | 7666 | Port of the local web interface |
| AGENT | 0 | 1 installs the remote agent as a Windows service |
| AGENTPORT | 7777 | Port of the agent and of its firewall rule |
| TOKEN | — | Key for the agent; left out, the agent makes its own |
| CONTEXTMENU | 1 | Analyse with G-Scan on folders and drives |
| DESKTOPSHORTCUT | 0 | Shortcut on the desktop |
| ALWAYSADMIN | 0 | 1 always starts G-Scan as administrator |
| SERVICEACCOUNT | — | Account for the agent service; empty is LocalSystem |
| SERVICEPASSWORD | — | Password for that account; not needed for a gMSA |
Everything at once
msiexec /i G-Scan-1.14.0-x64.msi /qn ^
INSTALLFOLDER="D:\Tools\G-Scan" ^
UIPORT=8100 AGENT=1 AGENTPORT=8101 TOKEN=<key> ^
CONTEXTMENU=1 DESKTOPSHORTCUT=0
The setup wizard, silently
G-Scan-1.14.0-setup.exe /VERYSILENT /DIR="D:\Tools\G-Scan" /PORT=8100 /AGENTPORT=8101
G-Scan-1.14.0-setup.exe /VERYSILENT /TASKS="desktopicon,contextmenu,agent"
The web interface listens on 127.0.0.1 only, so it needs no firewall rule. The agent’s rule is inbound TCP on AGENTPORT, private profile, local subnet, and only exists with AGENT=1.
Service account
Which account the agent runs as
By default the agent service runs as LocalSystem: it always works and it can read every file. Choose anything else with one thing in mind: an agent exists to read everything, and what an account cannot read is missing from the answer.
| SERVICEACCOUNT | When | Password |
|---|---|---|
| (empty) → LocalSystem | The default; always works | none |
| DOMAIN\svc_gscan$ | A fleet in AD: a gMSA in the local Administrators group | AD rotates it |
| DOMAIN\user | When it has to be a named account | yours to manage |
| NT SERVICE\GScanAgent | Only if you grant that SID the rights yourself | none |
msiexec /i G-Scan-1.14.0-x64.msi /qn AGENT=1 SERVICEACCOUNT="CONTOSO\svc_gscan$"
The installer grants the account Log on as a service itself, and keeps SERVICEPASSWORD out of the installation log. A virtual account is low-privileged by design, so turbo mode is unavailable under it.
SYSTEM is not a superset of you. It reaches other machines as the computer account, so a UNC path you can open may be refused. Its SSH keys live in C:\Windows\System32\config\systemprofile\.ssh; a password with the scan avoids that. And what it deletes goes to SYSTEM’s recycle bin and log.
NinjaOne
Ready-made scripts for NinjaOne
Three PowerShell scripts that run G-Scan from NinjaOne without a browser, a port or a key. Paste one into the automation library, run it as System, and schedule it. None of them deletes anything, and they work the same from any other RMM or a scheduled task. They also ship in the installation folder under docs\ninjaone.
| Script | What it does | Exit code |
|---|---|---|
| GScan-DiskReport.ps1 | Scans a drive and fills custom fields: a summary, free space in percent, what a safe clean-up frees, and an HTML report of the largest folders and the findings | 0 filled, 1 scan failed |
| GScan-DiskAlert.ps1 | Checks free space first and only scans when it is low; the output then says where the space went | 0 fine, 1 low |
| GScan-Export.ps1 | Writes the largest files, the file types and the findings as CSV to a locked-down folder, optionally copied to a share | 0 written, 1 failed |
Custom fields for the report
| Field | Type | Holds |
|---|---|---|
| gscanSummary | Text | Used, free and safe clean-up in one line, with the largest folder |
| gscanFreePercent | Integer | Free space in percent |
| gscanCleanableGb | Decimal | Recycle Bin, temporary files and downloaded updates together |
| gscanReport | WYSIWYG | The largest folders with their share, and the findings |
Create the fields first and allow automations to write to them; other names go in as parameters. Every setting is a parameter with a sensible default, such as -Drive D:\ -MinFreePercent 15, or a script variable with the same name. Tested under Windows PowerShell 5.1 with a stand-in for NinjaOne’s field command, not yet inside NinjaOne itself: if a field stays empty, check its name, its type and whether automations may write to it.
API
Everything the interface does, from a script
Plain HTTP with JSON, no SDK. Every button in the page is one call, which makes G-Scan easy to build into automation and third-party tools. Against an agent, send the key as X-GScan-Token. The Postman collection has an example for every call, and it also ships in the installation folder under api.
A request that a browser marks as coming from another website gets 403 foreignOrigin, so a web page cannot use G-Scan behind your back; scripts, curl, PowerShell and Postman are not affected. On the machine itself, gscan.com --scan C:\ --out - returns the same result as /api/result without the web server.
# start a scan
$r = Invoke-RestMethod 'http://127.0.0.1:7666/api/scan' -Method Post `
-Body @{ path = 'C:\'; kind = 'drive'; label = 'C:' }
# wait for it
do {
Start-Sleep -Milliseconds 400
$j = (Invoke-RestMethod 'http://127.0.0.1:7666/api/jobs') | Where-Object id -eq $r.id
} while ($j.state -eq 'scanning')
# the findings, as codes with numbers
$res = Invoke-RestMethod "http://127.0.0.1:7666/api/result?id=$($r.id)"
$res.advice | Select-Object code, bytes
| Endpoint | Does |
|---|---|
| GET /api/hello | Is it there, does it want a key, may it be shut down |
| GET /api/targets | Drives, WSL, machine, version, whether turbo is available |
| GET /api/browse?p= | The folders inside a path, live, without a scan |
| POST /api/scan | Start a scan: path, kind, label, and for SSH optionally password |
| GET /api/jobs | Every scan with its progress |
| GET /api/cancel?id= | Stop a running scan |
| GET /api/result?id= | The outcome: tree, largest files, types, advice |
| GET /api/dirs?id=&p= | Any folder at any depth, with totals |
| GET /api/files?p= | The files in one folder, live from disk |
| GET /api/ext?id=&e= | Where one file type sits, and its largest files |
| GET /api/export?id=&what= | CSV of types, files or advice |
| POST /api/delete | Delete, with dryrun=1 first |
| POST /api/emptybin | Empty the Recycle Bin and report what it freed |
| POST /api/cleanup | Empty the folders of one finding: temp files or Windows updates |
| GET /api/verifydups?id= | Confirm suspected duplicates by reading them |
| POST /api/dupsacross | Find duplicates: scans (ids), extensions (exts), smallest size (min), same name (names); GET for progress and the result |
| GET /api/reveal?p= | Open Windows Explorer there, on that machine |
| GET /api/forget?id= | Drop a result and free its memory |
| POST /api/elevate | Restart with administrator rights, local only |
| POST /api/quit | Shut down; an agent refuses |
A Linux host over SSH, with a password
curl -s -H "X-GScan-Token: $KEY" -X POST \
-d "kind=ssh" -d "label=web01 /var" \
--data-urlencode "path=admin@web01:/var" \
--data-urlencode "password=$SSH_PW" \
http://server:7777/api/scan
The password reaches ssh.exe through askpass, not its command line, and is not kept with the scan. Findings come back as codes such as recyclebin, tempfiles and duplicates, so a script can set thresholds without parsing sentences.
Changelog

1.14.0 – 11 September 2026
A command line that scans, writes the result and exits
For a script, an RMM or a scheduled job – no browser, no web server, no port, no key:
gscan.com --scan C:\ --out c.json the whole result as JSON
gscan.com --scan C:\ --out c.csv --what advice the findings as CSV
gscan.com --scan D:\Data --out - JSON to standard output
- The JSON is what
/api/resultreturns, the CSV what/api/exportreturns – the same code builds both now.--format json|csvfollows the file name unless given. - Exit code 0 is done, 1 the scan or writing failed, with the reason on standard error,
2 wrong arguments. The command line is strict on purpose: an unknown argument, a missing
value or
--whatwith JSON ends in 2 rather than in something else than was asked for. - Never a message box on this path. It usually runs as System from an RMM agent, in a session where nobody can click OK, and a box there would hang the script for good.
- The file is written next to the target and renamed into place, so a reader never sees half a file, and a symbolic link planted at the target is replaced, not followed.
C:means the drive, not the current folder on it. And"C:\", which Windows hands over asC:", is put right when it is the last argument.
gscan.com
gscan.exe is a program without a console, and neither cmd nor PowerShell waits for one:
a script carried on while the scan still ran, and the exit code was lost. gscan.com, a
148 KB console program next to gscan.exe in both installers, starts it with the same
arguments and the same input and output, waits, and passes the exit code on. In cmd,
typing gscan in the installation folder picks it; in PowerShell it is .\gscan.com or the
full path, because PowerShell runs nothing from the current folder by itself.
It starts gscan.exe from its own folder, never through the search path, and puts it in a
job that closes with it: break it off, or let an RMM kill the script on a time-out, and the
scan stops too instead of writing a file later.
Scripts for NinjaOne
docs\ninjaone, also in the installation folder, has three scripts and a README:
GScan-DiskReport.ps1fills custom fields: a summary, free space in percent, what the three safe clean-ups free, and an HTML report of the largest folders and the findings.GScan-DiskAlert.ps1asks Windows for the free space first and only scans when it is low; then it ends with exit code 1 and an output that says where the space went.GScan-Export.ps1writes the largest files, the file types and the findings as CSV to a folder it locks down to SYSTEM and Administrators, optionally copied to a share.
They run under Windows PowerShell 5.1, contain nothing but ASCII, and read G-Scan’s output as UTF-8 whatever the console code page is.
Security
Found while going over the new input for abuse. The first two were in earlier versions too.
- Other websites could use the page on a workstation. Without a key G-Scan listens on
127.0.0.1, and every website open in the same browser can send a form there – to
/api/delete, for instance – and with DNS rebinding even read the answer. API requests are now refused with 403 when the browser marks them as coming from another site (Sec-Fetch-Site), or, without a key, whenHostorOriginis not the loopback. Scripts, curl, PowerShell and Postman send none of these headers. - An SSH target could carry options. The host went onto ssh.exe’s command line
unquoted, so
-oProxyCommand=...would have started a program on this machine; the path went intofindon the far machine unquoted, so/var -deletewould have deleted instead of listed. The host may now only hold letters, digits and. - _ @ \ [ ] : %, not starting with-; the path must start with/and goes into the remote command between single quotes. A path with spaces works as a result. A relative path such asuser@host:datais refused withsshTarget. - A DLL next to the exe.
gscan.exeandgscan.comnow load their system DLLs from System32 only, so aversion.dllwaiting in Downloads next to a copiedgscan.exeis no longer picked up. - The command line takes no SSH password, only the key of the account it runs as: a password on a command line is readable for every local user.
- Output written as System: a link higher up the path is not something a program can rule
out by itself. The README says to use standard output or a folder only administrators can
write to, and
GScan-Export.ps1checks its folder before writing.
Verified
As an administrator on Windows 11, with three test suites that are now in tools\tests:
- Command line, 43 tests. JSON and CSV to a file and to standard output, counted against
Get-ChildItem(4 files, 120,586,246 bytes), including a file name with accents and a euro sign. Every exit code with its message on standard error: ten kinds of wrong arguments give 2 and write nothing. An existing file is replaced without leftovers; a symbolic link at the target is replaced while the file it pointed to stays untouched.gscan.exestarted without any console finishes and shows no window. Killinggscan.commid-scan stopsgscan.exeand leaves no file./api/exportgives the same CSV as the command line, byte for byte apart from the time line. - All of C:, 1,508,895 files: 1.6 seconds from the command to the JSON on disk (190 KB), in turbo mode.
- Windows PowerShell 5.1:
$LASTEXITCODEis right, and the JSON of C: reads withConvertFrom-Jsonin 30 ms. - NinjaOne scripts, 27 tests, under Windows PowerShell 5.1 with a stand-in for
Ninja-Property-Set-Piped: all four fields in the right form – a whole percentage, GB with a decimal point whatever the regional settings, HTML with both tables; an empty field name skips its field; the alert on both sides of the threshold and through a script variable; the export folder ends up with SYSTEM and Administrators only, without inheritance; only the script’s own old CSV files are removed; a folder under a junction is refused with nothing written. The suite caught one bug first: a share that does not exist madeCopy-Itemwrite a file of that name and report success. Now that is exit code 1. - Abuse, 30 tests, with raw HTTP requests so the headers are exactly what the test says.
A delete from another site, from an old browser that only sends
Origin, withOrigin: null, and through DNS rebinding (Host: evil.example) all get 403, and the file stays. The page itself,localhost,[::1]and a script without browser headers get 200. Six malformed SSH targets givesshTargetwithout starting ssh. A stand-inssh.exeshows the host as one argument and the path quoted:find '/var/met spatie -delete' -xdev ....DependentLoadFlagis 0x800 on both binaries. Photographed afterwards, the page still loads its scans. - The MSI unpacked with
msiexec /a:gscan.exeandgscan.com(both 1.14.0.0),Readme.html,API.md, the Postman collection,service-account.mdand the four files indocs\ninjaoneare identical to the build and the sources. - Installed by him:
gscan.comsits next togscan.exein the installation folder.
Not tested
- Inside NinjaOne itself. If a field stays empty: the field name, its type, and whether automations may write to it.
- Running as System. Scheduled tasks do not work on this machine, so everything ran as an administrator.
- Server and agent mode with the origin check live. They listen on the network, which could
put a firewall prompt on the screen. The part of the check they use,
Sec-Fetch-Site, is the same code the workstation tests went through.
1.13.0 – 11 September 2026
Find duplicates: always there, and you choose what it compares
Duplicates across every scan is now Find duplicates, and it stands in the sidebar with one scan as well as with several. Every choice is on that page:
- Look in – tick the scans to search. Scans over SSH are shown but cannot be ticked; their files cannot be read from here.
- Kind of files – Photos, video & audio, Documents, Archives & disk images,
Installers, All files, or My own extensions (
*.PDF, jpgworks as well as.pdf .jpg). Each kind brings its own smallest size: 1 MB for media and installers, 100 KB for documents, 10 MB for archives, 50 MB for everything. - From – that smallest size, from 100 KB to 1 GB.
- Same name, really. By default a duplicate has the same name and the same content;
case does not count, so
FOTO.JPGandfoto.jpgare one name. Also copies with another name compares content alone, the way it worked until now.
The kind, the size and the switch are remembered in the browser. Above a result the page says what it searched, and warns when the choices have changed since. Find duplicates → on a scan’s own Duplicates finding opens the page with only that scan ticked.
Faster, because it reads less
A scan keeps its files of 50 MB and up. Below that, the search lists the chosen kind of file once more per scan – through the turbo reader where it can, a folder walk otherwise – and reads only within groups that share a name and size. Measured on C: (1,482,050 files, scanned in 2.2 seconds): photos, video and audio from 1 MB with the same name took 4.6 seconds in all, found 170 groups with 992.9 MB of extra copies, and read 1.57 GB to prove it.
API
POST /api/dupsacross takes ids, exts, min and names. Without them it behaves as
before: every finished scan, from 50 MB, names ignored. The result carries opts with the
choices it ran with, plus ssh_skipped. Progress has a phase 0 for listing, in which the
counters count scans. API.md, the Postman collection, the README, Readme.html and
Administrator.md describe it.
Fixed
- The across-scans page drew nothing once a result existed: a number was calculated from the groups before the groups were.
cappedwas never reset, so after one search that hit the 40 GB reading limit every later result still said it was incomplete.- Deleting across scans matched a path to a scan by text alone, so a scan of
D:\Dataalso claimedD:\Data2\.... A scan’s root now has to be followed by\or/. - "in 1 scans" now reads "in 1 scan".
Verified
On a test instance with two small test folders and C:, through the API:
- Media from 1 MB, same name, two scans:
foto.jpgthree times (A,B,D\FOTO.JPG); with the switch on four times, the renamedvakantie.jpgincluded. The same size with other content was left out. - Media from 100 KB adds
klein.jpgtwice; documents from 100 KB findrapport.pdftwice; archives from 10 MB findgroot.isoacross both scans; one scan alone finds nothing. - Without any field: the old behaviour, from the files the scan already held.
- On the page: the choices, the searched-line and the warning after a change (light); deleting one extra copy from each of the two scans in one go put both in the Recycle Bin and in the log.
- On the 1.13.0 build: a search in one scan reads "in 1 scan"; a path under
duptestbelongs to scan 1, underduptest2to scan 2, and under a folderduptest3that was never scanned to no scan at all. - The MSI unpacked with
msiexec /a:gscan.exe(1.13.0.0),Readme.html,API.md,service-account.mdand the Postman collection are identical to the build and the sources. - Installed and tried by him: works.
- Not tested: the dark theme of the new page.
1.12.1 – 11 September 2026
The colours per level are back, now on both sides
The first attempt at a clearer explorer had a colour per folder level; the two panes of 1.12.0 left it out. He asked for it back – and with two panes it does more than it did in one list, because the same colour now ties the left to the right.
- Left: every folder icon has the colour of its level – Program Files blue, a folder in it orange, then green, purple, pink and yellow – and a line in that colour runs along everything below an open folder. The open folder’s row is tinted in its own colour.
- Right: the header and the rows carry a tint in the colour of the open folder, each step of the path has a small square in its level’s colour, and the subfolders have their icon in the colour they have on the left.
- The root of the scan has no colour. Hover, selection and the marks from a finding stay stronger than the tint. In the dark theme the tints are stronger, because the light theme’s would disappear there.
The Advice button on the overview is filled
Advice → under the findings on the overview is now a filled button, like New scan – it is the step most people take next.
Verified
- On C: (1,421,489 files), Program Files and three levels down to StarCitizen, light and dark: blue, orange and green match between the tree, the path and the contents; no script errors.
- The overview of a fresh scan (1,429,153 files): Advice → under the findings is filled blue, the same as New scan in the header.
- The MSI unpacked with
msiexec /a:gscan.exe(1.12.1.0),Readme.html,API.mdand the Postman collection are identical to the build and the sources.
Download
Release 1.14.0
12 Sep 2026 · Windows x64 · no .NET · no VC++ runtime · EN NL FR ES PT
SHA-256 .msi 1ad5ab3c8f1cab216c583c0d9fb0e2892ff74db80c1f1d152b56b64cc203e83e
SHA-256 .exe c887b0c01f690f3ebe3a30f4933d7160797c3221375ee9e8d758bc2deb07528e
Reviews of G-Scan
Be civilNo links280 charactersChecked before it appears
Hey look mom im on TV.



