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
| $Mac = 'xx:xx:xx:xx:xx:xx' | |
| $MacByteArray = $Mac -split "[:-]" | ForEach-Object { [Byte] "0x$_"} | |
| [Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray * 16) | |
| $UdpClient = New-Object System.Net.Sockets.UdpClient | |
| $UdpClient.Connect(([System.Net.IPAddress]::Broadcast),7) | |
| $UdpClient.Send($MagicPacket,$MagicPacket.Length) | |
| $UdpClient.Close() |
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
| $Cred = Get-Credential | |
| $From = $Cred.UserName | |
| $To = $Cred.UserName | |
| $Body = "Hello World!" | |
| $Subject = "O356 SMTP Test" | |
| Send-MailMessage -To $To -Subject $Subject -Body $Body -BodyAsHtml -UseSsl -Port 587 -SmtpServer 'smtp.office365.com' -From $From -Credential $Cred |
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
| [Net.ServicePointManager]::ServerCertificateValidationCallback = {$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
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0", | |
| "parameters": { | |
| "sku": { | |
| "type": "string", | |
| "defaultValue": "B1" | |
| } | |
| }, | |
| "variables": { |
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
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0", | |
| "parameters": { | |
| "authActiveDirectoryClientId": { | |
| "type": "string", | |
| "defaultValue": "" | |
| } | |
| }, | |
| "variables": { |
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
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0", | |
| "parameters": { | |
| "vnet": { | |
| "type": "string", | |
| "defaultValue": "resource-group/vnet-name" | |
| }, | |
| "ipAddress": { | |
| "type": "string", |
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
| <?xml version="1.0"?> | |
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="redirect HTTP to HTTPS" enabled="true" stopProcessing="true"> | |
| <match url="(.*)" /> | |
| <conditions> | |
| <add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
| </conditions> |
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
| { | |
| "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0", | |
| "parameters": {}, | |
| "variables": {}, | |
| "resources": [], | |
| "outputs": {} | |
| } |
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
| { | |
| "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
| "contentVersion": "1.0.0", | |
| "parameters": {} | |
| } |
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
| #!/bin/sh | |
| # crontab: * * * * * /{path}/{to}/{script}.sh | |
| ps -ef | grep 'node {script}' | grep -v grep > /dev/null | |
| if [ $? != 0 ] | |
| then | |
| cd /{working}/{dir} | |
| nohup node {script} > /dev/null 2>&1 & | |
| fi |