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: Link On State of Multiple Devices | |
| description: | | |
| ## Link On State of Multiple Devices v1.0.0 | |
| Select multiple entities to link their on/off state. If any selected entity is turned on, the other selected entities will be sent a matching on command. | |
| You can select any entity, but only entities supported by the `homeassistant.turn_on` or `homeassistant.turn_off` service calls will work. | |
| ### Requirements |
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: Link On/Off State of Multiple Devices | |
| description: | | |
| ## Link On/Off State of Multiple Devices v1.0.0 | |
| Select multiple entities to link their on/off state. If any selected entity is turned on or off, the other selected entities will be sent a matching on or off command. | |
| You can select any entity, but only entities supported by the `homeassistant.turn_on` or `homeassistant.turn_off` service calls will work. | |
| ### Requirements |
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
| namespace PartnerDemo | |
| { | |
| using Azure.Core; | |
| using Azure.Identity; | |
| using System.Net.Http.Headers; | |
| using System.Reflection.PortableExecutable; | |
| using System.Security.Cryptography.X509Certificates; | |
| using System.Text.Json.Nodes; | |
| internal class Program |
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 CreateNewLocalUser([string]$user, [string]$pass) { | |
| Write-Host "Validating local user '$user' exists" | |
| if ($null -eq (Get-LocalUser | Where-Object {$_.Name -eq $user})) { | |
| Write-Host "Creating local user '$user'" | |
| $securePass = ConvertTo-SecureString $pass -AsPlainText -Force | |
| New-LocalUser -Name $user -Password $securePass -FullName "DevTest Lab User" -Description "DevTest Lab Test Account" | Out-Null | |
| } else { | |
| Write-Host "Local user '$user' already exists" | |
| } | |
| } |
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
| $soundDevices = Get-CimInstance win32_sounddevice | |
| if ($soundDevices -eq $null) | |
| { | |
| Write-Host "No SoundDevices" | |
| } | |
| foreach ($soundDevice in $soundDevices) | |
| { | |
| Write-Host "SoundDevice Name: $($soundDevice.Name) Description: $($soundDevice.Description)" | |
| } |
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
| $newNetworkWindowPath = "HKLM:\System\CurrentControlSet\Control\Network\NewNetworkWindowOff" | |
| Write-Host "Validating NewNetworkWindowOff Path exists" | |
| if ($false -eq $(Test-Path $newNetworkWindowPath)) | |
| { | |
| Write-Host "Creating NewNetworkWindowOff Registry Path" | |
| New-Item -Path $newNetworkWindowPath -ItemType Key | Out-Null | |
| } |
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
| Restart-Computer -Force -Wait |
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
| trigger: | |
| - master | |
| variables: | |
| system.debug: true | |
| jobs: | |
| - job: job0 | |
| pool: 'demo-pool' |
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 Get-Sessions { | |
| param( | |
| $computerName = "localhost" | |
| ) | |
| try | |
| { | |
| $sessions = qwinsta /server:$computerName | |
| } | |
| catch |
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 Get-RegistryValue($path, $name) { | |
| $registryKey = (Get-ItemProperty -Path $path -Name $name -ErrorAction SilentlyContinue) | |
| if ($null -eq $registryKey) | |
| { | |
| return $null | |
| } | |
| return $registryKey.$name | |
| } |
NewerOlder