Skip to content

Instantly share code, notes, and snippets.

@kmondesir
kmondesir / getallsoftware.ps1
Last active October 10, 2019 15:47
Get all installed software
$allSystemSoftware = Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
@kmondesir
kmondesir / installedsoftware.ps1
Last active September 7, 2019 12:14
PowerShell script for getting all software currently installed on a Win 10 system.
$allSystemSoftware = Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
@kmondesir
kmondesir / vba hithighlighter.vba
Created September 7, 2019 12:04
Counts groups of words and highlights them in a word document
Sub HitHighLighter3()
    'Modified to include a count of all words found in the document.
    'Modified 24 May 2014 by Kino Mondesir
    Dim words() As Array, list As String, wholeDocument As Range, list as Dictionary, report As String, _
source As String, destination As String
    words = Split(InputBox("Word HitHighLighter", "Please enter each word separated by a comma") , ",")
    list = New Dictionary
     source =  Environ("UserProfile")  & "\" & "Documents" & "\" & "Input"
     destination = Environ("UserProfile")  & "\" & "Documents" & "\" & "Output"
@kmondesir
kmondesir / python.json
Last active October 12, 2019 13:03
Adds logging to Python scripts
{
"Adds logic for logging": {
"prefix": "log",
"body": [
"import logging as log",
"severity = {",
"\t\t\t\t\t\t'CRITICAL': 50,",
"\t\t\t\t\t\t'ERROR': 40,",
"\t\t\t\t\t\t'WARNING': 30,",
"\t\t\t\t\t\t'INFO': 20,",
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0
[Environment]::SetEnvironmentVariable("Title","Value","Type")
# Type can be one of three values: User, Machine, Process
[bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")
# Make sure to run the shell with administrator credentials
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
# Run shell with admin credentials
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 1
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"
#Run shell with admin credentials
Enable-PSRemoting -Force -SkipNetworkProfileCheck