From 67671dcdfdf46193c6e056b9da50e6410197d9e6 Mon Sep 17 00:00:00 2001 From: lub Date: Tue, 28 Apr 2020 15:32:33 +0200 Subject: [PATCH] add Get-Feierabend --- profile.ps1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/profile.ps1 b/profile.ps1 index ca9fd5a..9cb82d0 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -38,6 +38,27 @@ function Get-BetterADUser { Get-ADUser -Filter $filter -Server $Server } +function Get-Feierabend { + param ( + [Parameter(Position = 0)] + [datetime] + $Begin, + + [Parameter(Position = 1)] + [datetime] + $PauseStart, + + [Parameter(Position = 2)] + [datetime] + $PauseEnd, + + [Parameter(Position = 3)] + [single] + $Hours = 6.5 + ) + + $Begin.AddHours($Hours).Add($PauseEnd - $PauseStart) +} function fsh { param ( [string]$ComputerName