Skip to content

Instantly share code, notes, and snippets.

View Parse-QuserTime
param(
[CmdletBinding()]
[ValidatePattern('^(((?<days>[0-9]+)\+)?((?<hours>[0-9]{1,2}):))?(?<mins>[0-9]{1,2})$')]
[string]$quserTimeString
)
$quserTimeString -match '^(((?<days>[0-9]+)\+)?((?<hours>[0-9]{1,2}):))?(?<mins>[0-9]{1,2})$' | Out-Null
View Parse-QuserTime-Alternate.ps1
param(
[CmdletBinding()]
[ValidatePattern('^(((?<days>[0-9]+)\+)?((?<hours>[0-9]{1,2}):))?(?<mins>[0-9]{1,2})$')]
[string]$quserTimeString
)
$string = $quserTimeString
View LogoffRemoteIdleUsers.ps1
param(
[CmdletBinding(DefaultParameterSetName="OU")]
[Parameter(
ParameterSetName="Computer",
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[string[]]$ComputerName,
[Parameter(ParameterSetName="OU")]
[string]$SearchBase = "OU=Target,OU=Stations,DC=hagatorn,DC=local",
View Clear Specific Supported Exam User Files.xml
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2017-04-25T15:39:00.4152962</Date>
<Author>DOMAIN\User</Author>
<Description>Triggers only on Exam Accounts 01-18 log-off events and clears just the logging off users files.</Description>
</RegistrationInfo>
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
@hagatorn
hagatorn / WOL-pdq.ps1
Last active Mar 24, 2017
WOL with pdq utility
View WOL-pdq.ps1
[cmdletbinding()]
param(
[Parameter(ParameterSetName=’NamedHost’)]
[string]$HostName,
[Parameter(ParameterSetName=’AllHosts’)]
[switch]$All,
[switch]$DHCP,
@hagatorn
hagatorn / WOL.ps1
Last active Mar 16, 2017
WOL with DHCP utility
View WOL.ps1
param(
[string]$HostName,
[string]$Mac,
[string]$ip,
[switch]$All,
[switch]$broadcast,
[ValidateSet(“Site1”,”Site2”)][string]$site = "Site1"
)
View SibeliusManualInstaller.ps1
#installers
.\Sibelius712b46.exe" /LSINFO=calf /VERYSILENT /SUPPRESSMSGBOXES
.\Sibelius713b77Update.exe" /LSINFO=calf /VERYSILENT /SUPPRESSMSGBOXES
#instrument files and reg mod.
$localPath = "C:\YOUR\PATH"
copy-item -Path "$installerPath\Sibelius 7 Sounds" -Destination $localPath -Recurse
# Sibelius Sounds Update must be run manually following silent install as it is not possible to suppress user interation
View SolidWorks2015-Silent.bat
REM Office Web Components
.\64bit\OfficeWeb_11\owc11.exe /quiet
REM Visual C++ 2005 Redistributables
pushd "64bit\Microsoft_C++_2005_Redistributable_(x64)"
.\vcredist_x64.exe /Q
popd
.\64bit\Microsoft_C++_2005_Redistributable\vcredist_x86.exe /Q
@hagatorn
hagatorn / List Gallery
Last active Dec 24, 2015
Alternative gallery with for kirby: uses a central csv table and image bank. In the text file for your page type ---- imagelist: yourfilename1, yourfilename2, yourfilename3, Allows for much easier page construction for large site that you may otherwise use a db for
View List Gallery
@hagatorn
hagatorn / Recursive tree style accordion for kirby
Last active Dec 17, 2015
Recursive tree style accordion for kirby
View Recursive tree style accordion for kirby
<?php if(!isset($subpages)) $subpages = $site->pages();
if(!isset($id)) $id = 0; ?>
<?php $id+=1;
foreach($site->breadcrumb() AS $crumb):
$breadcrumb[] = $crumb->url();
endforeach ?>
<ul id="accordiongroup_<?php
You can’t perform that action at this time.