From 2c112ad7fef670df0293ca57676dddb038fa1d05 Mon Sep 17 00:00:00 2001 From: Sam Erde Date: Fri, 27 Oct 2023 21:01:01 -0400 Subject: [PATCH] Moved sample from archive --- Functions in Hash Tables.ps1 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Functions in Hash Tables.ps1 diff --git a/Functions in Hash Tables.ps1 b/Functions in Hash Tables.ps1 new file mode 100644 index 0000000..3031259 --- /dev/null +++ b/Functions in Hash Tables.ps1 @@ -0,0 +1,28 @@ +$items = @{ + 'laptop' = { $args[0] * 600 } + 'rasppi' = { param($x = 1) $x * 5 } + 'arduino' = { param($x = 1) $x * 50 } +} + +$quantity = 4 +$value = &$items['laptop'] $quantity +'The value of {0} laptops is ${1}' -f $quantity, $value + +$quantity = 2 +$value = &$items['rasppi'] $quantity +'The value of {0} pi is ${1}' -f $quantity, $value + + + +$Files = @{ + OpenSSL = Join-Path -Path $Home -ChildPath "Documents\Tools\OpenSSL-Win64-3.0.0\bin\openssl.exe" + Config = Join-Path -Path $WorkingDir -ChildPath "$ShortName.txt" + Csr = Join-Path -Path $WorkingDir -ChildPath "$ShortName.csr" + Key = Join-Path -Path $WorkingDir -ChildPath "$ShortName.key" + KeyTmp = Join-Path -Path $WorkingDir -ChildPath "$ShortName.key.tmp" + Cert = Join-Path -Path $WorkingDir -ChildPath "$ShortName.crt" + PFX = Join-Path -Path $WorkingDir -ChildPath "$ShortName.pfx" +} + +$Files.OpenSSL +$Files.Config