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
sensor: | |
- platform: template | |
sensors: | |
wash_power: | |
friendly_name: "Current Wash Power" | |
unit_of_measurement: "W" | |
value_template: "{{ states.switch.zigbee_outlet.attributes.current_power_w }}" | |
washing_machine_status: | |
value_template: '{{ states.input_select.washing_machine_status.state}}' | |
friendly_name: 'Washing Machine Status' |
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
Param ( | |
[string]$Printservers = "oldPrintServer" | |
) | |
# Create new Excel workbook | |
cls | |
$Excel = New-Object -ComObject Excel.Application | |
$Excel.Visible = $True | |
$Excel = $Excel.Workbooks.Add() | |
$Sheet = $Excel.Worksheets.Item(1) |
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
Param ( | |
[string]$Printservers = "oldPrintServer" | |
) | |
# Create new Excel workbook | |
cls | |
$Excel = New-Object -ComObject Excel.Application | |
$Excel.Visible = $True | |
$Excel = $Excel.Workbooks.Add() | |
$Sheet = $Excel.Worksheets.Item(1) |
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
#Update configuraton for DHCP on Junos 12.x devices | |
#Nick Shores 1-8-2018 - Created for WRA | |
--- | |
- hosts: wra | |
gather_facts: no | |
connection: local | |
roles: | |
- Juniper.junos |
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
$Computerlist = get-content "\\vmware-host\Shared Folders\Documents\RGA\dns_server_updates.txt" | |
$dnsservers =@("192.168.0.9","192.168.0.12") | |
$cred = Get-Credential rga.local\it-services | |
foreach ($computername in $computerlist) { | |
$result = get-wmiobject win32_pingstatus -filter "address='$computername'" | |
if ($result.statuscode -eq 0) { | |
$remoteNic = get-wmiobject -class win32_networkadapter -computer $computername -Credential $cred | where-object {$_.Name -eq "vmxnet3 Ethernet Adapter"} | |
$index = $remotenic.index | |
$DNSlist = $(get-wmiobject win32_networkadapterconfiguration -computer $computername -Credential $cred -Filter ‘IPEnabled=true’ | where-object {$_.index -eq $index}).dnsserversearchorder |
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
$iplist = import-csv /Users/nshores/Documents/USA Properties/vms122018.csv | |
$guestcred = Get-Credential | |
$CompCollection=@() | |
$code = @' | |
$dns = Get-NetIPConfiguration | Select-Object -ExpandProperty DnsServer | select ServerAddresses | |
$dns.serveraddresses | |
'@ |
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 for updating Pulse Secure network connection profiles on Windows clients. | |
#Any active profiles will be wiped during script execution and replaced with the target configuration. | |
#The script will also check for active VPN connections and copy the pulse configuration locally before proceeding. | |
#Make sure to update $connection_profile to match your environment location. | |
#Pulse 5.3 and above is required for connection delete support. | |
#Nick Shores - 12/11/18 | |
$connection_profile = '\\wra-fileserver.wra.local\Fileserver\Support\wra.pulsepreconfig' | |
write-host "Configuration Location:" `n$connection_profile `n |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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
#Disable SSL Cert Check | |
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type) | |
{ | |
$certCallback = @" | |
using System; | |
using System.Net; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
public class ServerCertificateValidationCallback | |
{ |
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
$computers = Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion -first 20 | |
$CompCollection=@() | |
foreach ($c in $computers){ | |
#define custom object | |
write-host "Checking $($c.name)" | |
$CompCurrent = New-Object -TypeName psobject | |
$CompCurrent | Add-Member -MemberType NoteProperty -Name ComputerName -Value "" |