Author: MrNetTek
PowerShell – Remove Built-in Administrator Account
To delete the built-in Administrator account, this is the process: #1 Take ownership HKEY_LOCAL_MACHINE\SAM\SAM #2 Grant reg rights HKEY_LOCAL_MACHINE\SAM\SAM #3 Delete HKEY_LOCAL_MACHINE\SAM\SAM\Builtin\Account\Users\Names\Administrator #4 Remove user account from Local Users and Groups Notes PropagationFlags Enum InheritanceFlags Enum AccessControlType Enum Remove-Item -Path “HKLM:\SAM\SAM\Domains\Account\Users\Names\Administrator” HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\Names\Administrator
Chrome – Set Startup Page – Policy
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google] [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome] “HomepageLocation”=”https://www.google.com” [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\Recommended] “HomepageLocation”=”https://www.google.com” [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\Recommended\RestoreOnStartupURLs] “1”=”https://www.google.com” [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\RestoreOnStartupURLs] “1”=”https://www.google.com”
PowerShell – Autopilot – Return HWID
Run in PowerShell as admin Output Notes
Batch – Create PFX Certificate – Sign Code or Package; MSIX
:: MrNetTek :: https://eddiejackson.net/blog :: 9/16/2020 :: free for public use :: free to claim as your own @echo off cd “%~dp0” :: STEP 1 :: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86 makecert.exe ^ -n “CN=CodeSign” ^ -r ^ -pe ^ -a sha512 ^ -len 4096 ^ -cy authority ^ -sv CodeSign.pvk ^ CodeSign.cer :: STEP 2 Read More …
WordPress – Disable Search Icon in Menu
In the WordPress UI: Appearance > Customize > Additional CSS Notes
Python – Read JSON File
Tested in Spyder 3.3.3 (for Python 3.7). employees.json employees.py Output {‘lname’: ‘Jackson’, ‘fname’: ‘Eddie’, ’email’: ‘EJackson@domain.com’, ‘address’: ‘1111 Right Lane’, ‘title’: ‘Engineer’} {‘lname’: ‘Johnson’, ‘fname’: ‘Darrin’, ’email’: ‘DJohnson@domain.com’, ‘address’: ‘2222 Left Lane’, ‘title’: ‘IT Manager’} {‘lname’: ‘Lee’, ‘fname’: ‘Keith’, ’email’: ‘KLee@domain.com’, ‘address’: ‘3333 Middle Lane’, ‘title’: ‘Executive Assistant’}
Python – Read Text File, Parse Data
Tested in Spyder 3.3.3 (for Python 3.7). users.txt Jackson, Eddie Bach, Joseph Johnson, Larry Lowe, Daniel Denning, Jeffrey users.py Output WHOLE TEXT FILE —————— Jackson, Eddie Bach, Joseph Johnson, Larry Lowe, Daniel Denning, Jeffrey LINE BY LINE —————— Line1: Jackson, Eddie Line2: Bach, Joseph Line3: Johnson, Larry Line4: Lowe, Daniel Line5: Denning, Jeffrey Read More …
Mac – Citrix Client – Detection Rule in SCCM
In SCCM Software Library > Overview > Application Management > Applications > Application > Click Deployment Types > Double-click Program > Click Detection Method tab > Add Clause Config Settings Type: Application Bundle Application bundle ID: com.citrix.receiver.nomas Data Type: Version Operator: Greater than or equal to Value: 20.8.0
Batch – Clear Windows Logs
FOR /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1” exit /b 0 Notes Clear events after saving log: wevtutil cl Application /bu:C:\backup\back.evtx Return names of logs: wevtutil el Status of log: wevtutil gli Application All Options wevtutil [{el | enum-logs}] [{gl | get-log} <Logname> [/f:<Format>]] [{sl | set-log} <Logname> [/e:<Enabled>] [/i:<Isolation>] Read More …