From 3fab585eec1c6b5c10b260ce23e652691e963cf7 Mon Sep 17 00:00:00 2001 From: Zweili Andreas Date: Mon, 17 Jul 2017 07:29:47 +0200 Subject: [PATCH] extend template --- scripts/template.ps1 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/scripts/template.ps1 b/scripts/template.ps1 index 6845fca..6c4f8cc 100644 --- a/scripts/template.ps1 +++ b/scripts/template.ps1 @@ -1,15 +1,24 @@ # load ActiveDirectory module -Try -{ - Import-Module ActiveDirectory -ErrorAction Stop -} -Catch -{ - Write-Warning $_ - Break -} + function Show-Menu { + begin + { + try + { + Import-Module ActiveDirectory -ErrorAction Stop + } + catch + { + Write-Warning $_ + break + } + } + + process + { + + } }