SCCM – PowerShell – Return Domain using ResourceID
Template Example Production Example
Lab Core | The Lab of MrNetTek
A blog about IT, technical solutions, and code.
Template Example Production Example
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
Various methods of changing the time zone. PowerShell and command methods can be used in SCCM and Intune. PowerShell Command tzutil /s “Eastern Standard Time” Intune – Custom Device Configuration Profile * requires 1903 and newer Microsoft Intune > Device configuration > Profiles > Create Profile > Windows 10 and later > Custom > click Read More …