Month: August 2020

Ubuntu: Testing Webcam

Most modern Linux distributions come with drivers for webcams. It's highly likely that a your…

PowerShell: Invoke Backup SQL Database

Function to invoke SQL Backups on a Remote SQL Server: # invokeSqlBackup.ps1 # Version 0.0.1…

PowerShell: Windows Performance Benchmarking

There are many 3rd party performance benchmark tools for Windows 10. Out of convenience, PowerShell…

Windows: Force Dedicated RAM to Integrated Graphics

Please be advised that the following instructions will only be effective for Windows computers with…

PowerShell: Get SQL Server Performance Counters

Version 2 # getSqlPerformanceCounter.ps1 # version 0.02 $computername='sql0003.kimconnect.com' function getSqlPerformanceCounter($server=$env:computername,$sampleInterval=10,$maxSamples=1){ $PerformanceCounterSampleSet=$result=@() $counters=@( '\Memory\Available MBytes', '\Memory\Pages/sec',…

PowerShell: Use WinSCP to Test a SFTP Connection

# testSftpConnect.ps1 # Quick script to test SFTP connectivity $username='FTPUSER' $password='PASSWORD' $sftpServer='x.x.x.x' $sftpPort=22 function testSftpConnect($sftpServer,$username,$password,$sftpPort){…

PowerShell: Quick Exercise On Disks Operations

# View disks on the system get-disk Number Friendly Name Serial Number HealthStatus OperationalStatus Total…

Linux: How to Create Windows Bootable USB Drive Via CLI

Creating a Linux bootable USB on a GNU/Linux machine is too easy, especially via GUI.…

Linux: How to Find USB Thumb Drive via CLI

0. Trigger SCSI Device Scans # Scan all SCSI host controllers # If a new…

Fix Ubuntu / Lubuntu ‘Hypernation Button Does Nothing’ Problem

# Step 0: find swap # Option A: root@kimlinux:/home/kim# cat /proc/swaps Filename Type Size Used…

PowerShell: Chicken Scratch Ports Scanner

Although there are optimized applications to perform this task such as Angry Port Scanner, NMAP,…

PowerShell: Setting Windows Pagefile

# setPageFile.ps1 # Source: # Reposting here as such code seems to be open source…

PowerShell: Optimize SQL Server Memory & CPU Resources

# optimizeSqlServer.ps1 # Version 0.0.2 # This version deals with Memory, CPU # Future versions…

Ubuntu/Lubuntu: Setting Up Development Environment

Linux is a great platform for development. One advantage of a this OS is that…

Linux: An Experience in Resizing a Root Partition

Scope: These instructions are intended for Linux systems without Logical Volume Manager (LVM). For that…

Logical Volume Management: A Practical Illustration

# Runas root kim@kimlinux:~$ sudo su - # List all disks fdisk -l | grep…

PowerShell: List All Hyper-V Snapshots of All VMs in All Clusters in Domain

# listHyperVSnapshots.ps1 $clusterName='*' function listAllHyperVSnapshots([string[]]$clusterName){ function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu' $rsatWindows81='https://download.microsoft.com/download/1/8/E/18EA4843-C596-4542-9236-DE46F780806E/Windows8.1-KB2693643-x64.msu' $rsat1709…

PowerShell: Gather All Guess VM of All Hyper-V Clusters in the Domain

# getAllVms.ps1 $clusterName='*' function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu' $rsatWindows81='https://download.microsoft.com/download/1/8/E/18EA4843-C596-4542-9236-DE46F780806E/Windows8.1-KB2693643-x64.msu' $rsat1709 = "https://download.microsoft.com/download/1/D/8/1D8B5022-5477-4B9A-8104-6A71FF9D98AB/WindowsTH-RSAT_WS_1709-x64.msu"…

PowerShell: Get All Hyper-V Servers in the Domain or Forest

This is a working version to correct my previous codes posted somewhere on this site…

Windows: Create a Quick Hot Spot From A Wired Computer with Spare Wireless Adapter

# Start the Hot Spot netsh wlan set hostednetwork mode=allow ssid="$env:username hotspot" key=whatpassword netsh wlan…