Author: kimconnect

Microsoft Management Console Snap-in Shortcuts

Admin Snap-in Command Quality of Service Control Management ACSsnap.msc ADSI Edit ADSIedit.msc Authorization manager AZman.msc…

Active Directory Domain Controller Certificates Installation Guide

Overview This article deals with Domain Controllers, rather than member servers. Thus, Active Directory or…

PowerShell: Get OU of a User & Get All Users In an OU

function getUserOu($username){ if(!(get-module activedirectory -ea SilentlyContinue)){ $osType=switch ((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType){ 1 {'client'} 2 {'domaincontroller'} 3…

PowerShell: Test Domain Username & Password Credential

Version 2: function testCredential($username,$password){ # Get current domain using logged-on user's credentials $isDomainJoined=$env:USERDOMAIN -ne $env:COMPUTERNAME…

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){…