PowerShell: Create AD computer objects as per the given details in the list
Sometimes admin need to pre-create AD computer object in correct OU as per the user and update the user’s information it belongs to in the Managed By field. Below script will receive input as list of computers and their corresponding users to whom the machine will be assigned. Create two files in C:\Temp directory: ComputerList.txt […]
Windows Firewall – Disable / Enable
# Check Firewall StatusGet-NetFirewallProfile | Format-Table Name, Enabled # Disable FirewallSet-NetFirewallProfile -Profile Domain, Public, Private -Enabled False # Check Firewall StatusGet-NetFirewallProfile | Format-Table Name, Enabled # Enable FirewallSet-NetFirewallProfile -Profile Domain, Public, Private -Enabled True
PowerShell: Detect and Fix – Hybrid Join, CCM CoManagement and Intune Service
# Removing any previous variables and their values (if any) Remove-Variable -Name “*Check*” -Force -ErrorAction SilentlyContinue # Defining variables and system status $HybridCheck = C:\Windows\System32\dsregcmd.exe -ArgumentList “/status” -NoNewWindow | Select-String -Pattern KeySignTest | Select-Object -ExpandProperty Line -ErrorAction SilentlyContinue $CoManagementCheck = Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\CCM -Name “CoManagementFlags” | Select-Object -ExpandProperty CoManagementFlags -ErrorAction SilentlyContinue $IntuneServicecheck = Get-Service -DisplayName […]
Get values from two files and execute in PowerShell script
Administrators may need to execute a PowerShell script based on values inside two different files. This task can be achieved by using arrays in PowerShell. Consider a scenario in which you have a Computer Name and their respective MAC addresses in two different files. Then you can create two variables to store the computer names […]
Advanced Group Policy Management Server – Installation and Configuration
Microsoft Advanced Group Policy Management (AGPM) extends the capabilities of the Group Policy Management Console (GPMC) to provide comprehensive change control and improved management for Group Policy Objects (GPOs). AGPM is available as part of the Microsoft Desktop Optimization Pack (MDOP) for Software Assurance.
PrintNightmare Fix – Finally
CVE-2021-34527 ‘PrintNightmare’ Known issues with KB5006667 Error: Windows cannot connect to Printer Detail: Recently introduced security update by Microsoft is causing failure for installation of Printer on Windows 10 Resolution : For now until further update, uninstall the patch and complete the printer installation. Let the patch install again later after next client policy update. […]
MS Defender – Fix Sensor Onboarding Issue
Sometimes you will notice that few machines will fail to complete the Defender Onboarding process. This issue could occur due to multiple reasons, one of the common reasons is machine unexpectedly restarted during the onboarding process. There is no article or any documentation from Microsoft explaining this behavior however, on further troubleshooting using process monitor, […]
Power Automate – Send Birthday Email
If you are just starting with power automate and trying out some simple stuffs to find your way around. One of the most popular automation is to trigger an automated email greeting Birthday wishes to your colleagues. Not everyone would have access to system to fetch the birthdates of colleagues. If you have a small […]
Query SCCM Baselines using WMI
To get list of all baselines assigned to the computer: Open PowerShell with elevated privilege and run below command: Get-WmiObject -Namespace root\ccm\dcm -class SMS_DesiredConfiguration | Select-Object -Property DisplayName | Sort-Object -Property DisplayName To Trigger evaluation of one specific baseline: e.g., you want to trigger a baseline that evaluates Hybrid Azure […]
Group Policy Search
With Group Policy Search you can search for available Group Policies and easily share it via link or email. https://gpsearch.azurewebsites.net