Author: kimconnect

How to Add Domain Admins to SQL Server

Step 1: Right-click Start > Search > type in 'ssms.exe' > right-click Microsoft SQL Server…

SQL: Creating a Storage Report of Databases Residing within Server

Method 1: -- Get sizes of all databases from system (not real-time) WITH fs AS…

SQL: Backup Database and Purge It From SQL Server

/* Make a Final Backup of Database, Purge Its Backup and Restore History, and Remove…

PowerShell: Windows 10 Cleanup

Update: there's a new script to cleanup windows here. function cleanWindows{ write-host 'Disabling Windows Media…

Set Windows Remote Desktop To Allow Blank Passwords

By default, Windows restricts RDP access for account without passwords. Of course, this is a…

PowerShell: Check Registry Path, Key, and Dword Value

$path='HKLM:\Software\Intel' $keyName='GMM' $dwordName='DedicatedSegmentSize' $dwordValue=512 Function CheckRegistryKey { param( [Parameter(Position = 0, Mandatory = $true)][String]$path, [Parameter(Position…

Linux: Enable PowerShell Remoting WinRM Client on Ubuntu 20.04

This note is a work-in-progress as the NTLM authentication support module by Microsoft for Ubuntu…

PowerShell: Purge, Destroy, or Empty a Directory!

# WARNING: THIS IS A VERY DESTRUCTIVE FUNCTION. IF EXECUTED AT THE WRONG DIRECTORY WHERE…

Tasks to Perform After Windows 10 Upgrade

Target for Windows upgrade cleanup: C:\$Windows.~BT\* C:\$Windows.~LS\* C:\$Windows.~WS\* C:\ESD\Download\* C:\ESD\Windows\* C:\$WINDOWS.~Q\* C:\$INPLACE.~TR\* C:\Windows.old\* C:\Windows\Panther Please…

PowerShell: Graceful Shutdown of MS SQL Server

import-module sqlps CD SQLSERVER:\SQL\$env:computername $sql = (get-item .).ManagedComputer # This command stops MSSQL$instanceName, SQLSERVERAGENT, SQLAGENT$instanceName,…

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…