SCCM Package for Registry Permissions Change

Orignally I have Powershell script for doing that, but it turns out not so good: if (!(Test-Path HKCC:)) {New-PSDrive -PSProvider registry -Root HKEY_CURRENT_CONFIG -Name HKCC} $RegPath= ”HKCC:\SOFTWARE\XXX” New-Item -Path ”HKCC:\SOFTWARE\” -Name Encompass -Force $acl = Get-Acl $RegPath $rule = New-Object System.Security.AccessControl.RegistryAccessRule (“BUILTIN\Users”,”FullControl”,”Allow”) $rule2 = New-Object System.Security.AccessControl.RegistryAccessRule (“Everyone”,”FullControl”,”Allow”) $acl.SetAccessRule($rule) $acl.SetAccessRule($rule2) Here is the bath file to […]

Rapid7 Insight Agent Update Fix Discover Script

# Rapid7 Insight Agent Update Fix Discover Script # Rui Qiu # v1.1 # 4/3/2018 $folder = “C:\Program Files\Rapid7\Endpoint Agent” if (test-path $folder) { $content = (get-content config.json | where { $_ -match “smart_ttl_start” } ) # echo $content $key = ‘ “smart_ttl_start”: 128,’ # echo $key if ($content -eq $key) {$Compliance = “Yes”} Else […]

Issues Installing Shavlik (Ivanti Patch)

I didn’t realize a simple issue can cause a big issue with Shavlik: When launching the installer from Shavlik, you have to “Unblock” the file before running the isntaller, otherwise you will get failed to create folder when you are running the Ivanti Patch checker. And when you launch the SCCM console, you have to […]

How to Uninstall NoMAD

Here is a simple script to uninstall NoMAD: # /bin/bash # Rui Qiu # Remove NoMad and use direct AD Bind loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk ‘{ print $3 }’` pkill “NoMAD” sudo rm -rf /Applications/NoMAD.app sudo rm -rf “/Library/Managed Preferences/com.trusourcelabs.NoMAD.plist” sudo rm -rf “/Library/Managed Preferences/$loggedInUser/com.trusourcelabs.NoMAD.plist” sudo rm -rf “/Users/$loggedInUser/Library/LaunchAgents/com.trusourcelabs.NoMAD.plist”   And you can use […]

Shell Script to Remove Centrify, Move Wifi/LAN, and Request 802.1 Certificate

Here is a long script of doing a lot of things,  it deletes the Centrify Binding, Centrify certificates and itself, binds the machine to AD via native plugin and requests a 802.1x certificate via native RPC   #!/bin/sh # This script deletes the Centrify Binding, Centrify certificates and itself, binds the machine to AD via native […]