This blog is going to cover various things I have done to fix issues at work or at home.
Wednesday, February 22, 2017
Searching for a string in text files
I hate it when I know I used a specific piece of code somewhere, but cannot remember which file had it. So I use this:
Get-ChildItem -Path "\\server\folder\" -Recurse | Select-String -Pattern "some string" | Group Path | Select Name
Wednesday, January 18, 2017
Detect and Remove Windows Updates
On occasion there are needs to remove certain updates from a local machine. Here are scripts that I have used to do that.
You can create a simple baseline in SCCM (or other tools) to detect the patch and then uninstall. In this case we are looking to remove KB2553154. Detection Script:
You can create a simple baseline in SCCM (or other tools) to detect the patch and then uninstall. In this case we are looking to remove KB2553154. Detection Script:
$GetHotfix = Get-Hotfix | Where-Object {$_.HotFixID -eq 'KB2553154'}
if ($GetHotfix -eq $null) { return $true } else { return $false }
Remediation Script:wusa /uninstall /kb:2553154 /quiet /norestart
New Direction
This blog is going to take a new direction. My goal now is to document some of the things I have been doing at work / home so that I then can go back and reference it. Hopefully others will find benefits in it as well.
Subscribe to:
Posts (Atom)