PowerShell – Return Machines Based Upon Logon Count
Run on an AD network to return machines that have logged in X amount of times.
Lab Core | The Lab of MrNetTek
A blog about IT, technical solutions, and code.
Run on an AD network to return machines that have logged in X amount of times.
Testing what the process looks like… To turn this into a production ready process: Step 1 Create the batch file c:\YourScript\script.cmd Step 2 Create the scheduled task Step 3 Restart computer Step 4 Verify the script ran and the task was deleted Notes Something that is pretty cool, this process survives sysprep Read More …
For those in the know, remove this software… Notes Return all MS Apps Get-AppxPackage -AllUsers Remove Apps that Match String Get-AppxPackage *xboxapp* | Remove-AppxPackage Remove Specific App Remove-AppxPackage -AllUsers -Package “AD2F1837.HPJumpStarts_1.5.1296.0_x64__v10z8vjag6ke6” From the Command Line powershell.exe -command “Remove-AppxPackage -AllUsers -Package AD2F1837.HPJumpStarts_1.5.1296.0_x64__v10z8vjag6ke6” HP App Details Other Apps 7EE7776C.LinkedInforWindows_2.0.1.0_neutral__w1wdnht996qgy Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe Read More …
Use WMI in PowerShell to control log off and shutdown. Useful for when logoff.exe or shutdown.exe will not work (as in virtual sessions). 0 – Logoff 1 – Shutdown 2 – Reboot 4 – Forced logoff 5 – Forced shutdown 6 – Forced reboot 8 – Power off 12 – Forced power off Read More …
I created a log out script for AWS users. If they are idle for at least 60 minutes, a 15 minute countdown window comes up. I added this as a scheduled task to control when the form appears. What the form looks like If the user clicks the button, it closes the form, Read More …
PING a computer and show active results in a GUI Window (not as easy as it sounds). Get user input Show results Code Notes Download the Powershell Icon
Download devcon Create batch script :: MrNetTek :: eddiejackson.net/blog :: 4/27/2020 :: free for public use :: free to claim as your own @echo off cd “%~dp0” devcon disable “ms_pppoeminiport” devcon disable “ms_pptpminiport” devcon disable “ms_agilevpnminiport” devcon disable “ms_ndiswanbh” devcon disable “ms_ndiswanip” devcon disable “ms_sstpminiport” devcon disable “ms_ndiswanipv6” devcon disable “ms_l2tpminiport” devcon remove “ms_pppoeminiport” Read More …