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
<# | |
This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. | |
THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, | |
INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant | |
You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code | |
form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software | |
product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the | |
Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims | |
or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code. | |
Please note: None of the conditions |
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
# Created by SAMCOS @ MSFT, Collaboration with others! | |
## You must first connect to Microsoft Teams Powershell & Exchange Online Powershell for this to work. | |
## Links: | |
## Teams: https://www.powershellgallery.com/packages/MicrosoftTeams/1.0.0 | |
## Exchange: https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps | |
## Have fun! Let me know if you have any comments or asks! | |
$AllTeamsInOrg = (Get-Team).GroupID | |
$TeamList = @() | |
Write-Output "This may take a little bit of time... Please sit back, relax and enjoy some GIFs inside of Teams!" | |
Write-Host "" |
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
# Script requires AAD and CredentialManaer modules, AAD B2b user management permissions | |
Import-Module AzureADPreview | |
function Remove-PendingGuestInvites{ | |
Param( | |
[Parameter(Mandatory=$false, | |
ValueFromPipeline=$true)] | |
[switch] |
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
# Remotely create a number of content databases using New-SPContentDatabase | |
# https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/new-spcontentdatabase | |
$SPServers = @("server1") | |
$webApp = "https://webapp.domain.com" | |
$databasesRequired = 10 | |
$databasePrefix = "AG5Q_Prefix_Content" | |
$databaseServer = "DBserver.domain.com" | |
# Prepare remote PS session and load SP module |
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
Deep sleep switch |
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
alias: 'Bathroom - Toilet flush air freshener + tts' | |
trigger: | |
# Trigger when the toilet is flushed usng a sensor on the cistern flush arm. | |
platform: state | |
entity_id: binary_sensor.toilet_flusher_contact | |
to: "on" | |
action: |
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
# Deep sleep yaml highlights |
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
# https://www.home-assistant.io/docs/automation/ | |
automation: !include_dir_list ../automations | |
alias: 'Bathroom - Bath full alarm' | |
id: bath_full | |
trigger: | |
# Trigger when the water sensor in the bath turns on |
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
substitutions: | |
system_name: esph_dining_room_air_freshener | |
friendly_name: Esph Dining Room Air Freshener | |
esphome: | |
name: ${system_name} | |
platform: ESP32 | |
board: esp32doit-devkit-v1 | |
wifi: |
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
alias: Alexa - It's stinky | |
trigger: | |
# Trigger based on Alexa routine turning on the light. | |
- platform: state | |
entity_id: light.alexa_virtual | |
to: 'on' | |
condition: |