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
#Showing the state of a temperature in a template card: | |
{{ states('sensor.your_temperature_sensor') }} | |
#Change the colour of the light depending on status: | |
{% if is_state('light.your_light', 'on') %} | |
orange | |
{% endif %} | |
#Welcome template: | |
#Updated to greet the user by first name only |
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
#requires -version 3 | |
<# | |
.SYNOPSIS | |
Parse-HibpJson - Checks Active Directory for matching users, outputs info as objects | |
.DESCRIPTION | |
Cross-checks Active Directory for matching aliases from a HIBP breach JSON file, and then | |
lists the matching users and which breaches they were involved in. | |
Designed to be output to CSV for easy consumption in Excel with one breach per column |
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
# See if choco.exe is available. If not, stop execution | |
$chocoCmd = Get-Command -Name 'choco' -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Select-Object -ExpandProperty Source | |
if ($chocoCmd -eq $null) { break } | |
# Settings for the scheduled task | |
$taskAction = New-ScheduledTaskAction –Execute $chocoCmd -Argument 'upgrade all -y' | |
$taskTrigger = New-ScheduledTaskTrigger -AtStartup | |
$taskUserPrincipal = New-ScheduledTaskPrincipal -UserId 'SYSTEM' | |
$taskSettings = New-ScheduledTaskSettingsSet -Compatibility Win8 |
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"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<SetupUILanguage> | |
<UILanguage>en-AU</UILanguage> | |
</SetupUILanguage> | |
<InputLocale>0c09:00000409</InputLocale> | |
<UserLocale>en-AU</UserLocale> | |
<SystemLocale>en-AU</SystemLocale> |
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
SigninLogs | |
| mv-expand ConditionalAccessPolicies | |
| project DisplayName = tostring(ConditionalAccessPolicies.displayName),ID = tostring(ConditionalAccessPolicies.id) | |
| distinct ID,DisplayName | |
| order by DisplayName asc |
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
# The name of the account | |
$accountName = 'LocalAdmin' | |
$accountFullName = 'Local Administrator' | |
$accountComment = 'Backup Local Administrator Account' | |
# Any users listed here will be disabled by this script | |
$usersToDisable = 'Administrator','Guest' | |
# Set up some Event Log stuff | |
$sourceName = "$($MyInvocation.MyCommand.Name).ps1" |
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
#Requires -Version 4.0 -RunAsAdministrator | |
<# | |
.SYNOPSIS | |
Manage-WiFiStatus.ps1 - Enable/Disable WiFi based on wired connectivity status | |
.DESCRIPTION | |
Disables the Wi-Fi adapter if the wired one is connected, and vice versa. | |
This is built for internal use on Windows 8.1, and depends on the new *-NetAdapter cmdlets in PS 4.0 |
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 | |
Remove-FilesiteViews.ps1 - Remove VDM files for all users | |
.DESCRIPTION | |
This script is designed to be run under the SYSTEM account, as it needs | |
access to every user's profile. This will work fine as a scheduled task, or | |
under SCCM or similar. | |
As per the release notes for Filesite 9.0 Update 5, all VDM files need to be deleted |
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
# List of add-in names that ARE permitted. Everything else will be disabled | |
$permittedAddIns = "Redemption.Addin","WorkSiteEmailManagement.Connect","imFileSite.Connect" | |
# Registry paths to search | |
$registryPaths = "Registry::HKEY_USERS\S-1-5-21-*\Software\Microsoft\Office\Outlook\Addins", | |
"Registry::HKEY_USERS\S-1-5-21-*\Software\Wow6432Node\Microsoft\Office\Outlook\Addins", | |
"HKLM:\Software\Wow6432Node\Microsoft\Office\Outlook\Addins", | |
"HKLM:\Software\Microsoft\Office\Outlook\Addins" | |
# Build up a list of add-ins by searching the specified paths |
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-PerformanceCounter | |
{ | |
# Get the Performance Counters from the Registry | |
$counters = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009' -Name 'counter' | Select-Object -ExpandProperty Counter | |
# Remove the last line | |
$counters = $counters | Select-Object -SkipLast 1 | |
# Split the string into an array | |
$counters = $counters.Split([Environment]::NewLine) |