Category: SysAdmin
get Windows serial / activation key
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v BackupProductKeyDefault
windows, powershell – izlistaj sve upravljačke programe
powershell.ps1 Get-WmiObject Win32_PnPSignedDriver | select DeviceName, DeviceClass, Manufacturer, DriverVersion, DriverDate, InfName | Out-GridView dism.exe dism.exe /online /get-drivers /format:table Obriši driver pnputil.exe -d oem987.inf…
Očisti sve EventLogove
batch.cmd / powershell.ps1 @echo off FOR /F "tokens=*" %%G IN (‘wevtutil.exe el’) DO (wevtutil.exe cl "%%G") exit /b Ručno FOR /F "tokens=*" %G IN (‘wevtutil.exe…
Kopiranje datoteke na / sa mobitela / tableta spojenog putem USB-a
Preduvjeti • ADB je instaliran na računalu https://www.xda-developers.com/install-adb-windows-macos-linux • mobitel/tablet je u načinu rada “USB debugging” = ON ○ Settings >> About phone >> Build…
Instaliraj Webmin na Ubuntu
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh apt-get install webmin –install-recommends webmin xwebmin install xinstall
Windows 11 – Dodaj korisnika u “Administrators” – Fakof! Modul ne prepoznaje Windows PIN, a točan je
Odnosi se vjerojatno na sve administrativne radnje, a ne samo na dodavanje korisnika u lokalne grupe. Problem Hoćeš dodati novog korisnika u neku Windows grupu….
Outlook – Dark mode – Immersive reader
Ako prebaciš Outlook u “Black”, ali ti i dalje ne pokazuje ikonicu “Immersive reader” ili “Switch background / Dark mode”, pa je sve black osim…
Kreiraj SystemRestorePoint
Ručno Start >> Run >> SystemPropertiesProtection >> pa slijedi upute batch.cmd Koristi se powershell 5 powershell -version 5 -command "Checkpoint-Computer -Description (Get-Date -UFormat %Y%m%d) -RestorePointType…
Backup Registryja ERUNT-om
ERUNT https://www.bleepingcomputer.com/download/erunt/dl/96/ batch.cmd Koristi se Powershell 5 @echo off powershell -version 5 -command "c:\Progra~2\ERUNT\ERUNT.EXE D:\Backup\ERUNT\$(Get-Date -UFormat %Y-%m-%d) sysreg curuser otherusers" Upute Ako ti se sruše…
WAN IP adresa
bash.sh curl –silent https://ipinfo.io/geo curl –silent https://am.i.mullvad.net/json powershell.ps1 (invoke-webrequest https://ipinfo.io/geo).content ipinfo xipinfo ajpi xajpi wan xwan ipaddress xipaddress address xaddress adresa xadresa
Linux – Shutdown, wakeup
bash.sh /usr/sbin/rtcwake –mode mem –local –time $(date +%s –date "tomorrow 05:01") –verbose shutdown wakeup shut down wake up cli commandline command line xshutdown xwakeup xshut…
Powershell – All history
Get-Content ((Get-PSReadlineOption).HistorySavePath) posh pwsh powershell history all xposh xpwsh xpowershell xhistory xall
NtfsDisableLastAccessUpdate – Disable last access update
Onemogući zapisivanje datuma zadnjeg pristupa datoteci RegEdit >> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate = DWORD 0x80000001 ili FSUtil Behavior Set DisableLastAccess 1 Provjera stanja FSUtil Behavior Query DisableLastAccess Stanje…
Nextcloud – Batch upload
Import iz commandlineta u NextCloud: curl -u <%USERNAME%>:<%LOZINKA%> -T X:\Proba123.pdf http://sljedecioblak.server.tld/remote.php/dav/files/datotetke/ xcurl xnextcloud upload batch cli commandline command line xcli xcommandline script xscript
Ubuntu timezone
$ date Tue Sep 6 06:46:41 UTC 2022 $ timedatectl Local time: Tue 2022-09-06 06:47:09 UTC Universal time: Tue 2022-09-06 06:47:09 UTC RTC time: Tue…
Kako ukloniti sve postove s Reddita
https://github.com/x89/Shreddit reddit xreddit nuke xnuke delete xdelete destroy xdestroy obrisati xobrisati¸¸
Prebroj datoteke
powershell.ps1 (Get-ChildItem "neštonešto*.txt" -File | Measure-Object | %{$_.Count}) prebrojavanje datoteka xprebrojavanje xdatoteka count files xcount xfiles number of files broj datoteka
Bjutifuliziran messages / system log
sudo apt install ccze -y tail /var/log/messages –sleep-interval=1 –follow | ccze -m ansi less messages syslog beautiful colors boje bojce nešto prekrasno xless xmessages xsyslog…
NCFTP (ncftpput, ncftpget, …)
https://www.ncftp.com/download/ ncftpput -F -u $ftpjuzerneijm -p $ftplozinka somware.org /folder_na_serveru/ datoteka_za_na_server.zip ftp xftp upload xupload ncftp xncftp