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
Install-Module PSHTMLTools |
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
$QuakesData = Invoke-RestMethod -uri "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_month.geojson" | |
[array]$Locations = ForEach ($Quake in ($QuakesData.Features | Select -First $Quakes)) | |
{ [PSCustomObject]@{ | |
Title = $Quake.properties.place | |
Magnitude = $Quake.properties.mag | |
TimeDate = [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddMilliseconds($Quake.properties.time)) | |
Lon = $Quake.geometry.coordinates[0] | |
Lat = $Quake.geometry.coordinates[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
Context "Domain Replication" { | |
$ReplErrors = Get-ADReplicationPartnerMetadata -Target * -Partition * | |
It "Last Replication Result" { | |
$ReplErrors | Measure-Object -Property LastReplicationResult -Sum | Select -ExpandProperty Sum | Should Be 0 | |
} | |
It "Consecutive Replication Failures" { | |
$ReplErrors | Measure-Object -Property ConsecutiveReplicationFailures -Sum | Select -ExpandProperty Sum | Should Be 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
$Tests = @( | |
"Running partition tests on : ForestDnsZones" | |
"Running enterprise tests on : domain.surlyadmin.com" | |
) | |
ForEach ($Line in $Tests) | |
{ | |
Switch ($_) -Regex | |
{ | |
"running (?<Zone>partition|enterprise) tests on : (?<PartTest>.*)" { |
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
#Define Quarters | |
$Quarters = @{} | |
$Start = Get-Date -Month 1 -Date 1 -Year (Get-Date).Year | |
ForEach ($Q in (1..4)) | |
{ | |
$Quarters.Add($Q,[PSCustomObject]@{ | |
From = $Start | |
To = $Start.AddMonths(3).AddTicks(-1) | |
}) | |
$Start = $Start.AddMonths(3) |
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
$Dir = "c:\dropbox" | |
$RoboCopyList = Invoke-Expression -Command "Robocopy $Dir NULL /L /S /NJH /NJS /BYTES /FP /NC /NDL /XJ /TS /R:0 /W:0" | |
ForEach ($File in $RoboCopyList) | |
{ If ($File -match "(?<Size>\d+)\s(?<Date>\S+\s\S+)\s+(?<Folder>\S+)\\(?<Name>.*$)") | |
{ [PSCustomObject]@{ | |
Name = $Matches.Name | |
Size = [int32]$Matches.Size | |
LastWriteTime = [datetime]$Matches.Date | |
} | |
} |
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
Get-ADUser martin9700 -properties LockedOut |
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
<div id="Chart0"></div> |
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
Date | Frogs | Eagles | Pigs | |
---|---|---|---|---|
1/10 | 10 | 35 | 4 | |
1/11 | 3 | 44 | 8 | |
1/12 | 8 | 12 | 12 | |
1/13 | 1 | 2 | 3 | |
1/14 | 13 | 35 | 10 | |
1/15 | 18 | 44 | 22 |
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
$Header = @" | |
<style> | |
H1 {color: #000099;} | |
TABLE {border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse; clear:both;} | |
TH {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #6495ED;font-size:1.5em;} | |
TD {border-width: 1px;padding: 3px;border-style: solid;border-color: black;} | |
DIV {float: left;} | |
</style> | |
$($Chart1.jscript) | |
$($Chart2.jscript) |
NewerOlder