This file contains hidden or 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
blueprint: | |
name: Appliance has finished | |
description: Do something when an appliance (like a washing machine or dishwasher) | |
has finished as detected by a power sensor. | |
domain: automation | |
input: | |
power_sensor: | |
name: Power Sensor | |
description: 'Power sensor entity (e.g. from a smart plug device).' | |
selector: |
This file contains hidden or 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
blueprint: | |
name: Doorbell - Notify Google and send camera snapshot to app | |
description: Make an announcement over Google devices when the doorbell is pushed | |
and send a camera snapshot to your app. | |
domain: automation | |
input: | |
doorbell: | |
name: Doorbell | |
description: This is the doorbell binary sensor | |
selector: |
This file contains hidden or 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
connection_messages true | |
allow_anonymous false | |
password_file /mosquitto/data/passwd | |
port 1883 | |
listener 9001 | |
protocol websockets | |
persistence true |
This file contains hidden or 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
#region OU Supporting Functions | |
#Establish the Delegation Group if necessary | |
function New-ADDelegationGroup { | |
Param ( | |
[string] $Site, | |
[string] $DelegationGroupOUPath, | |
[string] $DelegationRole = "OU Admin" | |
) | |
begin { |
This file contains hidden or 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 Compress-DiskImage { | |
param ( | |
[string]$VHDFile | |
) | |
process { | |
Write-Progress "Compress-DiskImage" "Calculating Current Metrics for $VHDFile" -id 1 -percentComplete 10 | |
$FileSizeStart = Get-ChildItem $VHDFile | select length | |
Write-Progress "Compress-DiskImage - Pass 1" "Mounting Virtual Hard Disk $VHDFile in Read and Write Mode" -id 1 -percentComplete 10 |
This file contains hidden or 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 New-VMReferenceImage { | |
param ( | |
[string]$VMName = "REF_2012R2_RTM_G1", | |
[string]$VMPath = "V:\Resources\Pool 1\Resources\", | |
[string]$SourceVHD = "V:\Resources\Pool 1\Parents\REF_2012R2_RTM_G1.vhdx", | |
[string]$VSwith = "Corpnet01", | |
[string]$VMVLanID = 110, | |
[switch]$PrepareNow | |
) |
This file contains hidden or 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
# Import Time | |
# First import the metadata in question from the exported xml file | |
$exportedquery = Import-Clixml "exportedproperties.xml" | |
# Now we have the same query as set above during export time in our hands in a variable called exportedquery | |
# let's do some setting of values | |
# first, get all the VMs that currently exist in the system | |
$currentVMs = get-vm | ? {$_.HostName -like "bil-vm-opsc1*"} | sort-object Name -descending |
This file contains hidden or 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 global:Add-Path() | |
{ | |
[Cmdletbinding()] | |
param ( | |
[parameter(Mandatory=$True, ValueFromPipeline=$True, Position=0)] | |
[String[]]$AddedFolder | |
) | |
# Get the current search path from the environment keys in the registry. | |
$OldPath=(Get-ItemProperty –Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' –Name PATH).Path |
This file contains hidden or 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 Online() | |
Dim objWmiProvider | |
Dim objService | |
Dim strServiceState | |
Dim iResponse | |
'Check to see if the service is running | |
set objWmiProvider = GetObject("winmgmts:/root/cimv2") | |
set objService = objWmiProvider.get("win32_service='FIMSynchronizationService'") | |
This file contains hidden or 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 LooksAlive( ) | |
Dim objWmiProvider | |
Dim objService | |
Dim strServiceState | |
set objWmiProvider = GetObject("winmgmts:/root/cimv2") | |
set objService = objWmiProvider.get("win32_service='FIMSynchronizationService'") | |
strServiceState = objService.state |
NewerOlder