Day: June 14, 2020

PowerShell: Replace 1 Line in a Text File Matching Certain Values

# replaceLine -textContent $fileContent -match $url -updateLineContent $record function replaceLine($textContent,$match,$updateLineContent){ $line = $textContent | Select-String…

PowerShell: Invoke-Command to Add A Host Record on DNS Server

# DNS Host Record Information $aRecord="superman" $recordIP='192.168.0.256' $zoneName='kimconnect.com' $dnsServer='dc01.intranet.kimconnect.com' # Admin Credential $adminUsername='DoeManeAdmin' $adminPassword='WhatPassword?' $adminCredential=New-Object…

PowerShell: Validate SQL Server Credentials

Add this to your SQL toolbox so that it'll be quick and easy to validate…

PowerShell: Error Unable to find package provider ‘NuGet’ Resolved

How to install module in Powow Shill Current Version: $moduleCommand='New-SSHSession' $moduleName='Posh-SSH' if(!(get-command $moduleCommand -ea Ignore)){…