Author: kimconnect

Resolving LDAPS Connection Errors

Errors: Can not connect to remote server: 5059 ERROR_CERTIFICATE_ERROR (unable to read server certificates from…

PowerShell: Alternative to Test-NetConnection for Legacy Windows

This little snippet is useful as a helper function to quickly determine port connectivity between…

PowerShell: Find a Downloadable File from a Web Page

Although the function below is adequate for simple purposes. It lacks the advanced algorithm to…

Hyper-V: Attach a New Virtual Disk

$vmName='TestVm' $storageLocation='\\FILESERVER06\SHAREXOXO' $newDiskSize='100GB' $dynamic=$true function createNewDisk{ param( $vmName, $storageLocation, $newDiskSize='100GB', $dynamic=$true ) $ErrorActionPreference='stop' try{ write-host…

WinRM and Trusted Hosts for Non-Domain Computers

Error: [TESTWINDOWS] Connecting to remote server TESTWINDOWS failed with the following error message : Access…

PowerShell: Update Local Windows Machine

This script is meant to be ran on a local computer. To update remote machines,…

PowerShell: Update Remote Windows

This script has been deprecated in favor of a more universal one here. function invokeWindowsUpdate{…

PowerShell: Scan for Available or Unavailable IPs

This function is a demonstration of multi-tasking using PowerShell. The program will ping multiple targets…

Microsoft Dynamics CRM IIS Pool Service Account Configuration

Summary The default CRM installation wizard provides some flexibility in specifying a deployment account. However,…

PowerShell: Monitor a Program Wizard for Its Task Completion

Once upon a time in the realm of SysAdmin endless green pastures, there were rampant…

SQL: Use PowerShell to Validate if Database Exists

This function may be invoked remotely from a machine that has SQL-PS module installed. The…

SQL: Use PowerShell to Generate a Database Object From Another Object

Have you ever wondered about the prospect of automating T-SQL executions on Windows? As your…

SQL: Using PowerShell to Check if a Table, View, or Stored Procedure Exists

#Usage # set variables $sqlServer='sql-server04' $databaseName="Test_Database" $objectType='view' $objectName='[dbo].[Test_View]' $saCred=get-credential # Call function checkDatabaseObject $sqlServer $databaseName…

PowerShell: Taking a Snapshot of a Windows Volume

I have this snippet embedded in various programs. Perhaps, it's useful to be posted as…

Microsoft Dynamics – Selecting an Org

# These two functions are convenient for CRM admins to quickly gather a hosted organization…

PowerShell: HashMap Enumeration Example – Set Active-X on Internet Explorer

function allowActiveX($zone='Trusted'){ #Source: https://learn.microsoft.com/en-us/previous-versions/troubleshoot/browsers/security-privacy/ie-security-zones-registry-entries #Reference table: #Value Setting #------------------------------ #0 My Computer #1 Local Intranet…

Update Host Files on Multiple Servers

$arecord='intranet' $domain='contoso.com' $serverIp='555.555.555.555' $groupTag='# Accounting Servers' $serversToEdit='Accounting1','Accounting2','Watermelon' $commentOut=$false function updateHostFiles{ param( $appLocalIp, $orgName, $domain, $searchString,…

Microsoft SQL Database Stuck in Restoring Mode

These are the possible resolutions from highest to lowest recommendations -- Normal method of restoring…

PowerShell: Sorting an Array of Strings as Numbers

This is a useful function to sort a list of computer names. The built-in sorting…

PowerShell: Coverting Hex or Bytes Array to ASCII

The following is an illustration of a practical usage of decrypting an ASCII encoded value…