This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-SqlVersionName { | |
param( | |
[Version]$Version | |
) | |
$lookup = @{ | |
'Name' = ('Major', 'Minor', 'RTM', 'SP1', 'SP2', 'SP3', 'SP4') | |
'2016' = ( 13, 0, 1601, 4001 ) | |
'2014' = ( 12, 0, 2000, 4100, 5000 ) | |
'2012' = ( 11, 0, 2100, 3000, 5058, 6020 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Work in progress | |
Pull build versions into PSObjects from the super-useful https://sqlserverbuilds.blogspot.co.uk | |
#> | |
#$Blog = Invoke-WebRequest https://sqlserverbuilds.blogspot.co.uk/ | |
$TablesHtml = [regex]::Matches( | |
$Blog.RawContent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-DnsCache { | |
<# | |
.Synopsis | |
Get entries from the DNS cache | |
#> | |
$Matches.Clear() | |
$DnsCache = (ipconfig /displaydns) -join "`r`n" | |
$Chunks = $DnsCache -split '\n\s*\r' | |
$Pattern = (New-Object System.Text.StringBuilder). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Provides a mapping of Windows drive letters to WWNs using inq.exe from EMC | |
.Description | |
Gets all volumes in Windows and provides device ID, drive letter and WWN. | |
You must have inq.exe available. | |
.Parameter Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Usage: | |
Get-ClusterName | |
Get-ClusterIpAddress | |
Get-ClusterSqlInstanceName | |
#> | |
#Get all the DNS names used on a cluster | |
function Get-ClusterName { | |
Get-ClusterNode | select @{Name = "ClusterResource"; Expression={"Cluster Node"}}, OwnerGroup, Name, DnsSuffix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
When you are roughing out a C# type in powershell, and you don't want to fire up | |
Visual Studio, it can get tiresome having to constantly reload your script editor. | |
This increments the class name each time you compile it. | |
Blogged in https://fsackur.github.io/2018/03/30/Reflecting-on-types/ | |
#> | |
$TypeDef = @' | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Frames = (@( | |
" <br> <br> <br> :r:. <br> :MBBBBQBv <br> sBBBBQBBBBBQBBBU: <br> 7BQBBBQghIsBbBBBBBQB: <br> iBBBBQBBQMMgQBQBQ7MBQBj <br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2019-02-01 21:41:26" build="180626"> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Shells::PowerShell}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> | |
<value name="StartFarEditors" type="hex" data="00"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Relay circuit design & spec for domestic electrical heating | |
============================================ | |
I have multiple Tado Smart Thermostats, model RU01, and multiple rooms with electrical underfloor heating. I require a power-switching circuit for the heating. | |
The heating in the largest room has a resistance of ~14 ohms and should run at 230VAC (I'm in the UK). All other rooms have higher resistance. This is a purely resistive load. | |
Tado do not provide great datasheets, but they have three pins for simple NO/NC/COM. I found a downloadable user guide at http://www.free-instruction-manuals.com/pdf/pa_1184164.pdf which states: | |
- Relay: max. 240V AC 6(4)A / max. 36V DC 6(4)A |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer