Month: December 2020

How to Install & Configure Pihole on Ubuntu 20.04

1. Installation- Run these commands: # sudo apt-get install gamin -ysudo curl -sSL https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh |…

How to Block Distracting Sites Such as Youtube and Hulu on Your Home Network

Overview: - You send a voice command 'block youtube' to Alexa, an Amazon personal assistant…

PowerShell: connectWinRM Function to Create New-PSSession

This reusable function may be included into PoSh scripts for better connection toward Windows machines…

PowerShell: Install Apps On List of Computers

[string[]]$computers=@( 'SERVER01', 'SERVER02', 'SERVER03' ) [string]$chocoAppName='notepad2' [version]$minVersion='4.2.25.20160422' $results=[hashtable]@{} foreach ($computer in $computers){ $result=invoke-command -computer $computer…

PowerShell: Installing or Including an Application On a Computer or Scripting Session

Sample Usage: PS C:\WINDOWS\system32> includeapp -appName notepadplusplus -appExe notepad++notepadplusplus version 7.91.0.0 already exists.True function includeApp($appName,$appExe=$False,$version){…

PowerShell: Renaming a System File

System files are typically owned by the TrustedInstaller account and protected from deletion or changes.…

PowerShell: Replacing Notepad with Notepad Plus Plus

Update 12/04/2020: there's a simpler solution - install notepad2! choco install notepad2 -y The command…

How to Host Multiple Domains with SSL Using Microsoft Information Service (IIS)

Step 1: Add SSL Certs into the computer information store Here's a sample script to…

PowerShell: How to Replace a System File – For Experimentation Purposes

# When attempting to rename a system protected file such as notepad.exe $notepadExe='C:\Windows\system32\notepad.exe' $newNotePadExe='C:\Users\rambo\Desktop\notepad.exe' rename-item…

Enabling Unix Newline ‘LF’ Support for Windows 10 Version 1706 or Higher

Please note that the following PoSH commands won't work on earlier versions of Windows (e.g.…

PowerShell: Check File Encoding UTF7, UTF8, UTF16, UTF32, ASCII

$filePath='C:\Windows\System32\Drivers\etc\hosts' function getFileEncoding($filePath) { # Checking the byte order mark (BOM) or first 4 bytes…

How to Set Default UTF-8 encoding for New Notepad Documents When Saving File

Part 1: Set Default UTF-8 encoding for New Notepad Documents When Saving File for Legacy…

Microsoft Dynamics 365: System Administrator Profile Corruption Problem

Symptoms: Field Security Profile Does Not List Enabled Custom Fields Certain forms would show a…

PowerShell: Rebooting a List of Computers

Recommended Method to Process a List of Computers: $computernames='web01','web02','web03' restart-computer -computername $computernames -force -wait Get-WmiObject…

Installing ScreenConnect Client on Ubuntu 20.04

Installation: # CLI installation method after setup file has been downloaded sudo apt install default-jre…

How to Enable XRDP Session Sharing

# Edit the xrdp init file sudo vim /etc/xrdp/xrdp.ini # Add this at the bottom…

Linux: Init Process in the Background and Detach

# Define program program=remmina # Method 1 nohup $program & # Method 2 $program &…