1*a4d08de4SAdam Hornáček<!DOCTYPE html> 2*a4d08de4SAdam Hornáček<html lang="en"> 3eeb7e5b3SAdam Hornáček<head> 4*a4d08de4SAdam Hornáček<meta charset="UTF-8"> 5eeb7e5b3SAdam Hornáček<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body> 6eeb7e5b3SAdam Hornáček<script type="text/javascript">/* <![CDATA[ */ 7eeb7e5b3SAdam Hornáčekfunction get_sym_list(){return [["Variable","xv",[["ALBoundParameters.Add",177],["ALBoundParameters.Remove",178],["All",85],["ApplicationPolicies",43],["CRLOverlapUnitsHours",462],["CRLOverlapUnitsHours",463],["CRLOverlapUnitsHours",464],["CRLOverlapUnitsHours",465],["CRLOverlapUnitsHours",466],["Cert",131],["Cert",172],["CertificateType",144],["ComputerName",93],["ComputerName",105],["ComputerName",109],["ComputerName",149],["ComputerName",162],["ComputerName",166],["ComputerName",174],["ExtendedKeyUsages",57],["FindType",76],["IncludeServices",88],["Location",78],["Location",137],["Machine",203],["Machine.DomainName",263],["Machine.DomainName",265],["PassThru",207],["Password",90],["Password",146],["Path",128],["PreDelaySeconds",205],["SearchString",73],["ServiceName",82],["ServiceName",140],["Store",80],["Store",134],["args",106],["args",163],["availableCombinations",386],["availableCombinations",387],["cRLDeltaPeriodUnitsHours",451],["cRLDeltaPeriodUnitsHours",452],["cRLDeltaPeriodUnitsHours",453],["cRLDeltaPeriodUnitsHours",454],["cRLDeltaPeriodUnitsHours",455],["cRLPeriodUnitsHours",440],["cRLPeriodUnitsHours",441],["cRLPeriodUnitsHours",442],["cRLPeriodUnitsHours",443],["cRLPeriodUnitsHours",444],["caDNSName",262],["certStoreTypes",25],["certStoreTypes",107],["certStoreTypes",164],["certsvalidityPeriodUnitsHours",429],["certsvalidityPeriodUnitsHours",430],["certsvalidityPeriodUnitsHours",431],["certsvalidityPeriodUnitsHours",432],["certsvalidityPeriodUnitsHours",433],["combination",389],["computer",103],["domain",223],["false",475],["functions",99],["functions",160],["gpoType",38],["key",343],["key.Key.PadRight",345],["keySet",311],["keySet.Key",313],["keySet.Key",315],["knownParameters",302],["knownParameters",303],["knownParameters",304],["knownParameters",305],["knownParameters",306],["knownParameters",308],["knownParameters",309],["machine.DomainName",245],["machine.IsDomainJoined",221],["machine.Roles.Properties.GetEnumerator",337],["machine.name",213],["machine.name",244],["machine.name",335],["name",322],["name",324],["param",218],["param.Add",225],["param.Add",226],["param.Add",241],["param.Add",242],["param.Add",253],["param.Add",254],["param.Add",256],["param.Add",267],["param.Add",271],["param.Add",278],["param.Add",280],["param.Add",286],["param.Add",288],["param.Add",291],["param.Add",293],["param.Add",295],["param.Add",298],["param.CACommonName",361],["param.CACommonName",366],["param.CAType",371],["param.CAType",373],["param.CAType",379],["param.CAType",381],["param.CRLDeltaPeriod",449],["param.CRLDeltaPeriodUnits",447],["param.CRLOverlapPeriod",460],["param.CRLOverlapUnits",458],["param.CRLPeriod",438],["param.CRLPeriodUnits",436],["param.CertsValidityPeriod",427],["param.CertsValidityPeriodUnits",425],["param.CryptoProviderName",391],["param.CryptoProviderName",393],["param.ForestAdminPassword",249],["param.ForestAdminUserName",248],["param.HashAlgorithmName",395],["param.HashAlgorithmName",397],["param.KeyLength",399],["param.KeyLength",401],["param.Password",247],["param.ValidityPeriod",416],["param.ValidityPeriodUnits",414],["param.username",246],["pkiInternalsTypes",29],["r",339],["r.Name",341],["role",216],["role.Name",275],["role.Name",369],["role.Name",377],["role.Properties.ContainsKey",277],["role.Properties.ContainsKey",279],["role.Properties.ContainsKey",285],["role.Properties.ContainsKey",287],["role.Properties.ContainsKey",290],["role.Properties.ContainsKey",292],["role.Properties.ContainsKey",294],["role.Properties.ContainsKey",297],["role.Properties.ContainsKey",359],["role.Properties.ContainsKey",364],["role.Properties.ContainsKey",406],["rootDc",228],["rootDc",229],["rootDc",238],["rootDomain",231],["rootDomain",236],["rootDomainNetBIOSName",232],["rootDomainNetBIOSName",237],["tempFile",168],["tempFile",169],["tempFile",170],["tempFile",180],["true",72],["true",75],["true",84],["true",127],["true",130],["true",133],["true",136],["true",139],["true",142],["true",148],["true",476],["unkownParFound",310],["unkownParFound",316],["unkownParFound",319],["validityPeriodUnitsHours",418],["validityPeriodUnitsHours",419],["validityPeriodUnitsHours",420],["validityPeriodUnitsHours",421],["validityPeriodUnitsHours",422],["variables",98],["variables",110],["variables",114],["variables",159],["variables",175],["variables",182],["x",101],["{param}",466]]],["Function","xf",[["Add-LabCertificate",122],["Get-LabCertificate",67],["Install-LabCAMachine",196]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class='fold-space'> </span><span class="c"># MIT License</span> 8eeb7e5b3SAdam Hornáček<a class="l" name="2" href="#2">2</a><span class='fold-space'> </span><span class="c">#</span> 9eeb7e5b3SAdam Hornáček<a class="l" name="3" href="#3">3</a><span class='fold-space'> </span><span class="c"># Copyright (c) 2016 Raimund Andée</span> 10eeb7e5b3SAdam Hornáček<a class="l" name="4" href="#4">4</a><span class='fold-space'> </span><span class="c">#</span> 11eeb7e5b3SAdam Hornáček<a class="l" name="5" href="#5">5</a><span class='fold-space'> </span><span class="c"># Permission is hereby granted, free of charge, to any person obtaining a copy</span> 12eeb7e5b3SAdam Hornáček<a class="l" name="6" href="#6">6</a><span class='fold-space'> </span><span class="c"># of this software and associated documentation files (the "Software"), to deal</span> 13eeb7e5b3SAdam Hornáček<a class="l" name="7" href="#7">7</a><span class='fold-space'> </span><span class="c"># in the Software without restriction, including without limitation the rights</span> 14eeb7e5b3SAdam Hornáček<a class="l" name="8" href="#8">8</a><span class='fold-space'> </span><span class="c"># to use, copy, modify, merge, publish, distribute, sublicense, <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> sell</span> 15eeb7e5b3SAdam Hornáček<a class="l" name="9" href="#9">9</a><span class='fold-space'> </span><span class="c"># copies of the Software, and to permit persons to whom the Software is</span> 16eeb7e5b3SAdam Hornáček<a class="hl" name="10" href="#10">10</a><span class='fold-space'> </span><span class="c"># furnished to do so, subject to the following conditions:</span> 17eeb7e5b3SAdam Hornáček<a class="l" name="11" href="#11">11</a><span class='fold-space'> </span><span class="c">#</span> 18eeb7e5b3SAdam Hornáček<a class="l" name="12" href="#12">12</a><span class='fold-space'> </span><span class="c"># The above copyright notice and this permission notice shall be included in all</span> 19eeb7e5b3SAdam Hornáček<a class="l" name="13" href="#13">13</a><span class='fold-space'> </span><span class="c"># copies or substantial portions of the Software.</span> 20eeb7e5b3SAdam Hornáček<a class="l" name="14" href="#14">14</a><span class='fold-space'> </span><span class="c">#</span> 21eeb7e5b3SAdam Hornáček<a class="l" name="15" href="#15">15</a><span class='fold-space'> </span><span class="c"># THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span> 22eeb7e5b3SAdam Hornáček<a class="l" name="16" href="#16">16</a><span class='fold-space'> </span><span class="c"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> 23eeb7e5b3SAdam Hornáček<a class="l" name="17" href="#17">17</a><span class='fold-space'> </span><span class="c"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span> 24eeb7e5b3SAdam Hornáček<a class="l" name="18" href="#18">18</a><span class='fold-space'> </span><span class="c"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> 25eeb7e5b3SAdam Hornáček<a class="l" name="19" href="#19">19</a><span class='fold-space'> </span><span class="c"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span> 26eeb7e5b3SAdam Hornáček<a class="hl" name="20" href="#20">20</a><span class='fold-space'> </span><span class="c"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> 27eeb7e5b3SAdam Hornáček<a class="l" name="21" href="#21">21</a><span class='fold-space'> </span><span class="c"># SOFTWARE.</span> 28eeb7e5b3SAdam Hornáček<a class="l" name="22" href="#22">22</a><span class='fold-space'> </span> 29eeb7e5b3SAdam Hornáček<a class="l" name="23" href="#23">23</a><span class='fold-space'> </span><span class="c">#region Internals</span> 30eeb7e5b3SAdam Hornáček<a class="l" name="24" href="#24">24</a><span class='fold-space'> </span><span class="c">#region .net Types</span> 31eeb7e5b3SAdam Hornáček<a class="l" name="25" href="#25">25</a><span class='fold-space'> </span>$<a class="xv" name="certStoreTypes"/><a href="/source/s?refs=certStoreTypes" class="xv intelliWindow-symbol" data-definition-place="def">certStoreTypes</a> = <span class="s">@' 32eeb7e5b3SAdam Hornáček<a class="l" name="26" href="#26">26</a><span class='fold-space'> </span>... 33eeb7e5b3SAdam Hornáček<a class="l" name="27" href="#27">27</a><span class='fold-space'> </span>'@</span> 34eeb7e5b3SAdam Hornáček<a class="l" name="28" href="#28">28</a><span class='fold-space'> </span> 35eeb7e5b3SAdam Hornáček<a class="l" name="29" href="#29">29</a><span class='fold-space'> </span>$<a class="xv" name="pkiInternalsTypes"/><a href="/source/s?refs=pkiInternalsTypes" class="xv intelliWindow-symbol" data-definition-place="def">pkiInternalsTypes</a> = <span class="s">@' 36eeb7e5b3SAdam Hornáček<a class="hl" name="30" href="#30">30</a><span class='fold-space'> </span>... 37eeb7e5b3SAdam Hornáček<a class="l" name="31" href="#31">31</a><span class='fold-space'> </span> /// <summary> 38eeb7e5b3SAdam Hornáček<a class="l" name="32" href="#32">32</a><span class='fold-space'> </span> /// 2.28 msPKI-Certificate-Name-Flag Attribute 39eeb7e5b3SAdam Hornáček<a class="l" name="33" href="#33">33</a><span class='fold-space'> </span> /// https://msdn.microsoft.com/en-us/library/cc226548.aspx 40eeb7e5b3SAdam Hornáček<a class="l" name="34" href="#34">34</a><span class='fold-space'> </span> /// </summary> 41eeb7e5b3SAdam Hornáček<a class="l" name="35" href="#35">35</a><span class='fold-space'> </span>... 42eeb7e5b3SAdam Hornáček<a class="l" name="36" href="#36">36</a><span class='fold-space'> </span>'@</span> 43eeb7e5b3SAdam Hornáček<a class="l" name="37" href="#37">37</a><span class='fold-space'> </span> 44eeb7e5b3SAdam Hornáček<a class="l" name="38" href="#38">38</a><span class='fold-space'> </span>$<a class="xv" name="gpoType"/><a href="/source/s?refs=gpoType" class="xv intelliWindow-symbol" data-definition-place="def">gpoType</a> = <span class="s">@' 45eeb7e5b3SAdam Hornáček<a class="l" name="39" href="#39">39</a><span class='fold-space'> </span>... 46eeb7e5b3SAdam Hornáček<a class="hl" name="40" href="#40">40</a><span class='fold-space'> </span>'@</span> 47eeb7e5b3SAdam Hornáček<a class="l" name="41" href="#41">41</a><span class='fold-space'> </span><span class="c">#endregion .net Types</span> 48eeb7e5b3SAdam Hornáček<a class="l" name="42" href="#42">42</a><span class='fold-space'> </span> 49eeb7e5b3SAdam Hornáček<a class="l" name="43" href="#43">43</a><span class='fold-space'> </span>$<a class="xv" name="ApplicationPolicies"/><a href="/source/s?refs=ApplicationPolicies" class="xv intelliWindow-symbol" data-definition-place="def">ApplicationPolicies</a> = @{ 50eeb7e5b3SAdam Hornáček<a class="l" name="44" href="#44">44</a><span class='fold-space'> </span> <span class="c"># Remote Desktop</span> 51eeb7e5b3SAdam Hornáček<a class="l" name="45" href="#45">45</a><span class='fold-space'> </span> <span class="s">'Remote Desktop'</span> = <span class="s">'<a href="/source/s?path=1.3.6.1.4.1.311.54.1.2">1.3.6.1.4.1.311.54.1.2</a>'</span> 52eeb7e5b3SAdam Hornáček<a class="l" name="46" href="#46">46</a><span class='fold-space'> </span> <span class="c"># Windows Update</span> 53eeb7e5b3SAdam Hornáček<a class="l" name="47" href="#47">47</a><span class='fold-space'> </span> <span class="s">'Windows Update'</span> = <span class="s">'<a href="/source/s?path=1.3.6.1.4.1.311.76.6.1">1.3.6.1.4.1.311.76.6.1</a>'</span> 54eeb7e5b3SAdam Hornáček<a class="l" name="48" href="#48">48</a><span class='fold-space'> </span> <span class="c"># Windows Third Party Applicaiton Component</span> 55eeb7e5b3SAdam Hornáček<a class="l" name="49" href="#49">49</a><span class='fold-space'> </span> <span class="s">'Windows Third Party Application Component'</span> = <span class="s">'<a href="/source/s?path=1.3.6.1.4.1.311.10.3.25">1.3.6.1.4.1.311.10.3.25</a>'</span> 56eeb7e5b3SAdam Hornáček<a class="hl" name="50" href="#50">50</a><span class='fold-space'> </span> <span class="c"># Windows TCB Component</span> 57eeb7e5b3SAdam Hornáček<a class="l" name="51" href="#51">51</a><span class='fold-space'> </span> <span class="s">'Windows TCB Component'</span> = <span class="s">'<a href="/source/s?path=1.3.6.1.4.1.311.10.3.23">1.3.6.1.4.1.311.10.3.23</a>'</span> 58eeb7e5b3SAdam Hornáček<a class="l" name="52" href="#52">52</a><span class='fold-space'> </span> <span class="c"># Windows Store</span> 59eeb7e5b3SAdam Hornáček<a class="l" name="53" href="#53">53</a><span class='fold-space'> </span> <span class="s">'Windows Store'</span> = <span class="s">'<a href="/source/s?path=1.3.6.1.4.1.311.76.3.1">1.3.6.1.4.1.311.76.3.1</a>'</span> 60eeb7e5b3SAdam Hornáček<a class="l" name="54" href="#54">54</a><span class='fold-space'> </span> <span class="c">#...</span> 61eeb7e5b3SAdam Hornáček<a class="l" name="55" href="#55">55</a><span class='fold-space'> </span>} 62eeb7e5b3SAdam Hornáček<a class="l" name="56" href="#56">56</a><span class='fold-space'> </span> 63eeb7e5b3SAdam Hornáček<a class="l" name="57" href="#57">57</a><span class='fold-space'> </span>$<a class="xv" name="ExtendedKeyUsages"/><a href="/source/s?refs=ExtendedKeyUsages" class="xv intelliWindow-symbol" data-definition-place="def">ExtendedKeyUsages</a> = @{ 64eeb7e5b3SAdam Hornáček<a class="l" name="58" href="#58">58</a><span class='fold-space'> </span> <a href="/source/s?defs=OldAuthorityKeyIdentifier" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OldAuthorityKeyIdentifier</a> = <span class="s">'<a href="/source/s?path=.29.1">.29.1</a>'</span> 65eeb7e5b3SAdam Hornáček<a class="l" name="59" href="#59">59</a><span class='fold-space'> </span> <a href="/source/s?defs=OldPrimaryKeyAttributes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OldPrimaryKeyAttributes</a> = <span class="s">'<a href="/source/s?path=2.5.29.2">2.5.29.2</a>'</span> 66eeb7e5b3SAdam Hornáček<a class="hl" name="60" href="#60">60</a><span class='fold-space'> </span> <span class="c">#...</span> 67eeb7e5b3SAdam Hornáček<a class="l" name="61" href="#61">61</a><span class='fold-space'> </span> <a href="/source/s?defs=X509version3CertificateExtensionInhibitAny" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509version3CertificateExtensionInhibitAny</a> = <span class="s">'<a href="/source/s?path=2.5.29.54">2.5.29.54</a>'</span> 68eeb7e5b3SAdam Hornáček<a class="l" name="62" href="#62">62</a><span class='fold-space'> </span>} 69eeb7e5b3SAdam Hornáček<a class="l" name="63" href="#63">63</a><span class='fold-space'> </span> 70eeb7e5b3SAdam Hornáček<a class="l" name="64" href="#64">64</a><span class='fold-space'> </span><span class="c">#endregion Internals</span> 71eeb7e5b3SAdam Hornáček<a class="l" name="65" href="#65">65</a><span class='fold-space'> </span> 72eeb7e5b3SAdam Hornáček<a class="l" name="66" href="#66">66</a><span class='fold-space'> </span><span class="c">#region Get-LabCertificate</span> 73eeb7e5b3SAdam Hornáček<span id='scope_id_3ab05a63' class='scope-head'><span class='scope-signature'>Get-LabCertificate()</span><a class="l" name="67" href="#67">67</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_3ab05a63_fold_icon'><span class='fold-icon'> </span></a><b>function</b> <a class="xf" name="Get-LabCertificate"/><a href="/source/s?refs=%22Get-LabCertificate%22" class="xf intelliWindow-symbol" data-definition-place="def">Get-LabCertificate</a></span> 74eeb7e5b3SAdam Hornáček<span id='scope_id_3ab05a63_fold' class='scope-body'><a class="l" name="68" href="#68">68</a><span class='fold-space'> </span>{ 75eeb7e5b3SAdam Hornáček<a class="l" name="69" href="#69">69</a><span class='fold-space'> </span> <span class="c"># .ExternalHelp <a href="/source/s?path=AutomatedLab.Help.xml">AutomatedLab.Help.xml</a></span> 76eeb7e5b3SAdam Hornáček<a class="hl" name="70" href="#70">70</a><span class='fold-space'> </span> [<a href="/source/s?defs=cmdletBinding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cmdletBinding</a>(<a href="/source/s?defs=DefaultParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DefaultParameterSetName</a> = <span class="s">'Find'</span>)] 77eeb7e5b3SAdam Hornáček<a class="l" name="71" href="#71">71</a><span class='fold-space'> </span> <b>param</b> ( 78eeb7e5b3SAdam Hornáček<a class="l" name="72" href="#72">72</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParameterSetName</a> = <span class="s">'Find'</span>)] 79eeb7e5b3SAdam Hornáček<a class="l" name="73" href="#73">73</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="SearchString"/><a href="/source/s?refs=SearchString" class="xv intelliWindow-symbol" data-definition-place="def">SearchString</a>, 80eeb7e5b3SAdam Hornáček<a class="l" name="74" href="#74">74</a><span class='fold-space'> </span> 81eeb7e5b3SAdam Hornáček<a class="l" name="75" href="#75">75</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParameterSetName</a> = <span class="s">'Find'</span>)] 82eeb7e5b3SAdam Hornáček<a class="l" name="76" href="#76">76</a><span class='fold-space'> </span> [<b>System</b>.<a href="/source/s?defs=Security" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Security</a>.<a href="/source/s?defs=Cryptography" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cryptography</a>.<a href="/source/s?defs=X509Certificates" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509Certificates</a>.<a href="/source/s?defs=X509FindType" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509FindType</a>]$<a class="xv" name="FindType"/><a href="/source/s?refs=FindType" class="xv intelliWindow-symbol" data-definition-place="def">FindType</a>, 83eeb7e5b3SAdam Hornáček<a class="l" name="77" href="#77">77</a><span class='fold-space'> </span> 84eeb7e5b3SAdam Hornáček<a class="l" name="78" href="#78">78</a><span class='fold-space'> </span> [<b>System</b>.<a href="/source/s?defs=Security" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Security</a>.<a href="/source/s?defs=Cryptography" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cryptography</a>.<a href="/source/s?defs=X509Certificates" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509Certificates</a>.<a href="/source/s?defs=CertStoreLocation" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertStoreLocation</a>]$<a class="xv" name="Location"/><a href="/source/s?refs=Location" class="xv intelliWindow-symbol" data-definition-place="def">Location</a>, 85eeb7e5b3SAdam Hornáček<a class="l" name="79" href="#79">79</a><span class='fold-space'> </span> 86eeb7e5b3SAdam Hornáček<a class="hl" name="80" href="#80">80</a><span class='fold-space'> </span> [<b>System</b>.<a href="/source/s?defs=Security" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Security</a>.<a href="/source/s?defs=Cryptography" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cryptography</a>.<a href="/source/s?defs=X509Certificates" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509Certificates</a>.<a href="/source/s?defs=StoreName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StoreName</a>]$<a class="xv" name="Store"/><a href="/source/s?refs=Store" class="xv intelliWindow-symbol" data-definition-place="def">Store</a>, 87eeb7e5b3SAdam Hornáček<a class="l" name="81" href="#81">81</a><span class='fold-space'> </span> 88eeb7e5b3SAdam Hornáček<a class="l" name="82" href="#82">82</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="ServiceName"/><a href="/source/s?refs=ServiceName" class="xv intelliWindow-symbol" data-definition-place="def">ServiceName</a>, 89eeb7e5b3SAdam Hornáček<a class="l" name="83" href="#83">83</a><span class='fold-space'> </span> 90eeb7e5b3SAdam Hornáček<a class="l" name="84" href="#84">84</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParameterSetName</a> = <span class="s">'All'</span>)] 91eeb7e5b3SAdam Hornáček<a class="l" name="85" href="#85">85</a><span class='fold-space'> </span> [<b>switch</b>]$<a class="xv" name="All"/><a href="/source/s?refs=All" class="xv intelliWindow-symbol" data-definition-place="def">All</a>, 92eeb7e5b3SAdam Hornáček<a class="l" name="86" href="#86">86</a><span class='fold-space'> </span> 93eeb7e5b3SAdam Hornáček<a class="l" name="87" href="#87">87</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=ParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParameterSetName</a> = <span class="s">'All'</span>)] 94eeb7e5b3SAdam Hornáček<a class="l" name="88" href="#88">88</a><span class='fold-space'> </span> [<b>switch</b>]$<a class="xv" name="IncludeServices"/><a href="/source/s?refs=IncludeServices" class="xv intelliWindow-symbol" data-definition-place="def">IncludeServices</a>, 95eeb7e5b3SAdam Hornáček<a class="l" name="89" href="#89">89</a><span class='fold-space'> </span> 96eeb7e5b3SAdam Hornáček<a class="hl" name="90" href="#90">90</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="Password"/><a href="/source/s?refs=Password" class="xv intelliWindow-symbol" data-definition-place="def">Password</a> = <span class="s">'AL'</span>, 97eeb7e5b3SAdam Hornáček<a class="l" name="91" href="#91">91</a><span class='fold-space'> </span> 98eeb7e5b3SAdam Hornáček<a class="l" name="92" href="#92">92</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a>)] 99eeb7e5b3SAdam Hornáček<a class="l" name="93" href="#93">93</a><span class='fold-space'> </span> [<b>string</b>[]]$<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> 100eeb7e5b3SAdam Hornáček<a class="l" name="94" href="#94">94</a><span class='fold-space'> </span> ) 101eeb7e5b3SAdam Hornáček<a class="l" name="95" href="#95">95</a><span class='fold-space'> </span> 102eeb7e5b3SAdam Hornáček<a class="l" name="96" href="#96">96</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Write-LogFunctionEntry%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Write-LogFunctionEntry</a> 103eeb7e5b3SAdam Hornáček<a class="l" name="97" href="#97">97</a><span class='fold-space'> </span> 104eeb7e5b3SAdam Hornáček<a class="l" name="98" href="#98">98</a><span class='fold-space'> </span> $<a class="xv" name="variables"/><a href="/source/s?refs=variables" class="xv intelliWindow-symbol" data-definition-place="def">variables</a> = <b>Get-Variable</b> -<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <a href="/source/s?defs=PSBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PSBoundParameters</a> 105eeb7e5b3SAdam Hornáček<a class="l" name="99" href="#99">99</a><span class='fold-space'> </span> $<a class="xv" name="functions"/><a href="/source/s?refs=functions" class="xv intelliWindow-symbol" data-definition-place="def">functions</a> = <b>Get-Command</b> -<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <a href="/source/s?defs=%22Get-Certificate2%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Get-Certificate2</a>, <a href="/source/s?defs=%22Sync-Parameter%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Sync-Parameter</a> 106eeb7e5b3SAdam Hornáček<a class="hl" name="100" href="#100">100</a><span class='fold-space'> </span> 107eeb7e5b3SAdam Hornáček<a class="l" name="101" href="#101">101</a><span class='fold-space'> </span> $<a class="xv" name="x"/><a href="/source/s?refs=x" class="xv intelliWindow-symbol" data-definition-place="def">x</a> = $<a href="/source/s?defs=PSBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PSBoundParameters</a> 108eeb7e5b3SAdam Hornáček<a class="l" name="102" href="#102">102</a><span class='fold-space'> </span> 109eeb7e5b3SAdam Hornáček<a class="l" name="103" href="#103">103</a><span class='fold-space'> </span> <b>foreach</b> ($<a class="xv" name="computer"/><a href="/source/s?refs=computer" class="xv intelliWindow-symbol" data-definition-place="def">computer</a> <b>in</b> $<a href="/source/s?defs=ComputerName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ComputerName</a>) 110eeb7e5b3SAdam Hornáček<a class="l" name="104" href="#104">104</a><span class='fold-space'> </span> { 111eeb7e5b3SAdam Hornáček<a class="l" name="105" href="#105">105</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Invoke-LabCommand%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Invoke-LabCommand</a> -<a href="/source/s?defs=ActivityName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ActivityName</a> <span class="s">'Adding Cert Store Types'</span> -<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> $<a href="/source/s?defs=ComputerName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ComputerName</a> -<a href="/source/s?defs=ScriptBlock" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ScriptBlock</a> { 112eeb7e5b3SAdam Hornáček<a class="l" name="106" href="#106">106</a><span class='fold-space'> </span> <b>Add-Type</b> -<a href="/source/s?defs=TypeDefinition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TypeDefinition</a> $<a class="xv" name="args"/><a href="/source/s?refs=args" class="xv intelliWindow-symbol" data-definition-place="def">args</a>[<span class="n">0</span>] 113eeb7e5b3SAdam Hornáček<a class="l" name="107" href="#107">107</a><span class='fold-space'> </span> } -<a href="/source/s?defs=ArgumentList" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ArgumentList</a> $<a class="xv" name="certStoreTypes"/><a href="/source/s?refs=certStoreTypes" class="xv intelliWindow-symbol" data-definition-place="def">certStoreTypes</a> -<a href="/source/s?defs=NoDisplay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">NoDisplay</a> 114eeb7e5b3SAdam Hornáček<a class="l" name="108" href="#108">108</a><span class='fold-space'> </span> 115eeb7e5b3SAdam Hornáček<a class="l" name="109" href="#109">109</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Invoke-LabCommand%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Invoke-LabCommand</a> -<a href="/source/s?defs=ActivityName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ActivityName</a> <span class="s">'Exporting certificates'</span> -<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> $<a href="/source/s?defs=ComputerName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ComputerName</a> -<a href="/source/s?defs=ScriptBlock" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ScriptBlock</a> { 116eeb7e5b3SAdam Hornáček<a class="hl" name="110" href="#110">110</a><span class='fold-space'> </span> $<a class="xv" name="variables"/><a href="/source/s?refs=variables" class="xv intelliWindow-symbol" data-definition-place="def">variables</a>[<span class="s">'Password'</span>] = $<a href="/source/s?defs=variables" class="intelliWindow-symbol" data-definition-place="undefined-in-file">variables</a>[<span class="s">'Password'</span>] | <b>ConvertTo-SecureString</b> -<a href="/source/s?defs=AsPlainText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">AsPlainText</a> -<a href="/source/s?defs=Force" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Force</a> 117eeb7e5b3SAdam Hornáček<a class="l" name="111" href="#111">111</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Sync-Parameter%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Sync-Parameter</a> -<a href="/source/s?defs=Command" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Command</a> (<b>Get-Command</b> -<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <a href="/source/s?defs=%22Get-Certificate2%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Get-Certificate2</a>) 118eeb7e5b3SAdam Hornáček<a class="l" name="112" href="#112">112</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Get-Certificate2%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Get-Certificate2</a> @<a href="/source/s?defs=ALBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ALBoundParameters</a> 119eeb7e5b3SAdam Hornáček<a class="l" name="113" href="#113">113</a><span class='fold-space'> </span> 120eeb7e5b3SAdam Hornáček<a class="l" name="114" href="#114">114</a><span class='fold-space'> </span> } -<a href="/source/s?defs=Variable" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Variable</a> $<a class="xv" name="variables"/><a href="/source/s?refs=variables" class="xv intelliWindow-symbol" data-definition-place="def">variables</a> -<b>Function</b> $<a href="/source/s?defs=functions" class="intelliWindow-symbol" data-definition-place="undefined-in-file">functions</a> -<a class="d intelliWindow-symbol" href="#PassThru" data-definition-place="defined-in-file">PassThru</a> 121eeb7e5b3SAdam Hornáček<a class="l" name="115" href="#115">115</a><span class='fold-space'> </span> } 122eeb7e5b3SAdam Hornáček<a class="l" name="116" href="#116">116</a><span class='fold-space'> </span> 123eeb7e5b3SAdam Hornáček<a class="l" name="117" href="#117">117</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Write-LogFunctionExit%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Write-LogFunctionExit</a> 124eeb7e5b3SAdam Hornáček<a class="l" name="118" href="#118">118</a><span class='fold-space'> </span>} 125eeb7e5b3SAdam Hornáček</span><a class="l" name="119" href="#119">119</a><span class='fold-space'> </span><span class="c">#endregion Get-LabCertificate</span> 126eeb7e5b3SAdam Hornáček<a class="hl" name="120" href="#120">120</a><span class='fold-space'> </span> 127eeb7e5b3SAdam Hornáček<a class="l" name="121" href="#121">121</a><span class='fold-space'> </span><span class="c">#region Add-LabCertificate</span> 128eeb7e5b3SAdam Hornáček<span id='scope_id_90876fe8' class='scope-head'><span class='scope-signature'>Add-LabCertificate()</span><a class="l" name="122" href="#122">122</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_90876fe8_fold_icon'><span class='fold-icon'> </span></a><b>function</b> <a class="xf" name="Add-LabCertificate"/><a href="/source/s?refs=%22Add-LabCertificate%22" class="xf intelliWindow-symbol" data-definition-place="def">Add-LabCertificate</a></span> 129eeb7e5b3SAdam Hornáček<span id='scope_id_90876fe8_fold' class='scope-body'><a class="l" name="123" href="#123">123</a><span class='fold-space'> </span>{ 130eeb7e5b3SAdam Hornáček<a class="l" name="124" href="#124">124</a><span class='fold-space'> </span> <span class="c"># .ExternalHelp <a href="/source/s?path=AutomatedLab.Help.xml">AutomatedLab.Help.xml</a></span> 131eeb7e5b3SAdam Hornáček<a class="l" name="125" href="#125">125</a><span class='fold-space'> </span> [<a href="/source/s?defs=cmdletBinding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cmdletBinding</a>(<a href="/source/s?defs=DefaultParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DefaultParameterSetName</a> = <span class="s">'ByteArray'</span>)] 132eeb7e5b3SAdam Hornáček<a class="l" name="126" href="#126">126</a><span class='fold-space'> </span> <b>param</b>( 133eeb7e5b3SAdam Hornáček<a class="l" name="127" href="#127">127</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>, <a href="/source/s?defs=ParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParameterSetName</a> = <span class="s">'File'</span>)] 134eeb7e5b3SAdam Hornáček<a class="l" name="128" href="#128">128</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="Path"/><a href="/source/s?refs=Path" class="xv intelliWindow-symbol" data-definition-place="def">Path</a>, 135eeb7e5b3SAdam Hornáček<a class="l" name="129" href="#129">129</a><span class='fold-space'> </span> 136eeb7e5b3SAdam Hornáček<a class="hl" name="130" href="#130">130</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>, <a href="/source/s?defs=ParameterSetName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParameterSetName</a> = <span class="s">'ByteArray'</span>)] 137eeb7e5b3SAdam Hornáček<a class="l" name="131" href="#131">131</a><span class='fold-space'> </span> [<b>byte</b>[]]$<a class="xv" name="Cert"/><a href="/source/s?refs=Cert" class="xv intelliWindow-symbol" data-definition-place="def">Cert</a>, 138eeb7e5b3SAdam Hornáček<a class="l" name="132" href="#132">132</a><span class='fold-space'> </span> 139eeb7e5b3SAdam Hornáček<a class="l" name="133" href="#133">133</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>)] 140eeb7e5b3SAdam Hornáček<a class="l" name="134" href="#134">134</a><span class='fold-space'> </span> [<b>System</b>.<a href="/source/s?defs=Security" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Security</a>.<a href="/source/s?defs=Cryptography" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cryptography</a>.<a href="/source/s?defs=X509Certificates" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509Certificates</a>.<a href="/source/s?defs=StoreName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StoreName</a>]$<a class="xv" name="Store"/><a href="/source/s?refs=Store" class="xv intelliWindow-symbol" data-definition-place="def">Store</a>, 141eeb7e5b3SAdam Hornáček<a class="l" name="135" href="#135">135</a><span class='fold-space'> </span> 142eeb7e5b3SAdam Hornáček<a class="l" name="136" href="#136">136</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a> = $<b>true</b>, <a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>)] 143eeb7e5b3SAdam Hornáček<a class="l" name="137" href="#137">137</a><span class='fold-space'> </span> [<b>System</b>.<a href="/source/s?defs=Security" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Security</a>.<a href="/source/s?defs=Cryptography" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cryptography</a>.<a href="/source/s?defs=X509Certificates" class="intelliWindow-symbol" data-definition-place="undefined-in-file">X509Certificates</a>.<a href="/source/s?defs=CertStoreLocation" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertStoreLocation</a>]$<a class="xv" name="Location"/><a href="/source/s?refs=Location" class="xv intelliWindow-symbol" data-definition-place="def">Location</a>, 144eeb7e5b3SAdam Hornáček<a class="l" name="138" href="#138">138</a><span class='fold-space'> </span> 145eeb7e5b3SAdam Hornáček<a class="l" name="139" href="#139">139</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>)] 146eeb7e5b3SAdam Hornáček<a class="hl" name="140" href="#140">140</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="ServiceName"/><a href="/source/s?refs=ServiceName" class="xv intelliWindow-symbol" data-definition-place="def">ServiceName</a>, 147eeb7e5b3SAdam Hornáček<a class="l" name="141" href="#141">141</a><span class='fold-space'> </span> 148eeb7e5b3SAdam Hornáček<a class="l" name="142" href="#142">142</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>)] 149eeb7e5b3SAdam Hornáček<a class="l" name="143" href="#143">143</a><span class='fold-space'> </span> [<a href="/source/s?defs=ValidateSet" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidateSet</a>(<span class="s">'CER'</span>, <span class="s">'PFX'</span>)] 150eeb7e5b3SAdam Hornáček<a class="l" name="144" href="#144">144</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="CertificateType"/><a href="/source/s?refs=CertificateType" class="xv intelliWindow-symbol" data-definition-place="def">CertificateType</a> = <span class="s">'CER'</span>, 151eeb7e5b3SAdam Hornáček<a class="l" name="145" href="#145">145</a><span class='fold-space'> </span> 152eeb7e5b3SAdam Hornáček<a class="l" name="146" href="#146">146</a><span class='fold-space'> </span> [<b>string</b>]$<a class="xv" name="Password"/><a href="/source/s?refs=Password" class="xv intelliWindow-symbol" data-definition-place="def">Password</a> = <span class="s">'AL'</span>, 153eeb7e5b3SAdam Hornáček<a class="l" name="147" href="#147">147</a><span class='fold-space'> </span> 154eeb7e5b3SAdam Hornáček<a class="l" name="148" href="#148">148</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a>, <a href="/source/s?defs=ValueFromPipelineByPropertyName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValueFromPipelineByPropertyName</a> = $<b>true</b>)] 155eeb7e5b3SAdam Hornáček<a class="l" name="149" href="#149">149</a><span class='fold-space'> </span> [<b>string</b>[]]$<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> 156eeb7e5b3SAdam Hornáček<a class="hl" name="150" href="#150">150</a><span class='fold-space'> </span> ) 157eeb7e5b3SAdam Hornáček<a class="l" name="151" href="#151">151</a><span class='fold-space'> </span> 158eeb7e5b3SAdam Hornáček<a class="l" name="152" href="#152">152</a><span class='fold-space'> </span> <b>begin</b> 159eeb7e5b3SAdam Hornáček<a class="l" name="153" href="#153">153</a><span class='fold-space'> </span> { 160eeb7e5b3SAdam Hornáček<a class="l" name="154" href="#154">154</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Write-LogFunctionEntry%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Write-LogFunctionEntry</a> 161eeb7e5b3SAdam Hornáček<a class="l" name="155" href="#155">155</a><span class='fold-space'> </span> } 162eeb7e5b3SAdam Hornáček<a class="l" name="156" href="#156">156</a><span class='fold-space'> </span> 163eeb7e5b3SAdam Hornáček<a class="l" name="157" href="#157">157</a><span class='fold-space'> </span> <b>process</b> 164eeb7e5b3SAdam Hornáček<a class="l" name="158" href="#158">158</a><span class='fold-space'> </span> { 165eeb7e5b3SAdam Hornáček<a class="l" name="159" href="#159">159</a><span class='fold-space'> </span> $<a class="xv" name="variables"/><a href="/source/s?refs=variables" class="xv intelliWindow-symbol" data-definition-place="def">variables</a> = <b>Get-Variable</b> -<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <a href="/source/s?defs=PSBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PSBoundParameters</a> 166eeb7e5b3SAdam Hornáček<a class="hl" name="160" href="#160">160</a><span class='fold-space'> </span> $<a class="xv" name="functions"/><a href="/source/s?refs=functions" class="xv intelliWindow-symbol" data-definition-place="def">functions</a> = <b>Get-Command</b> -<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <a href="/source/s?defs=%22Add-Certificate2%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add-Certificate2</a>, <a href="/source/s?defs=%22Sync-Parameter%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Sync-Parameter</a> 167eeb7e5b3SAdam Hornáček<a class="l" name="161" href="#161">161</a><span class='fold-space'> </span> 168eeb7e5b3SAdam Hornáček<a class="l" name="162" href="#162">162</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Invoke-LabCommand%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Invoke-LabCommand</a> -<a href="/source/s?defs=ActivityName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ActivityName</a> <span class="s">'Adding Cert Store Types'</span> -<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> $<a href="/source/s?defs=ComputerName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ComputerName</a> -<a href="/source/s?defs=ScriptBlock" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ScriptBlock</a> { 169eeb7e5b3SAdam Hornáček<a class="l" name="163" href="#163">163</a><span class='fold-space'> </span> <b>Add-Type</b> -<a href="/source/s?defs=TypeDefinition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TypeDefinition</a> $<a class="xv" name="args"/><a href="/source/s?refs=args" class="xv intelliWindow-symbol" data-definition-place="def">args</a>[<span class="n">0</span>] 170eeb7e5b3SAdam Hornáček<a class="l" name="164" href="#164">164</a><span class='fold-space'> </span> } -<a href="/source/s?defs=ArgumentList" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ArgumentList</a> $<a class="xv" name="certStoreTypes"/><a href="/source/s?refs=certStoreTypes" class="xv intelliWindow-symbol" data-definition-place="def">certStoreTypes</a> -<a href="/source/s?defs=NoDisplay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">NoDisplay</a> 171eeb7e5b3SAdam Hornáček<a class="l" name="165" href="#165">165</a><span class='fold-space'> </span> 172eeb7e5b3SAdam Hornáček<a class="l" name="166" href="#166">166</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Invoke-LabCommand%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Invoke-LabCommand</a> -<a href="/source/s?defs=ActivityName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ActivityName</a> <span class="s">'Storing certificate bytes on target machine'</span> -<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> $<a href="/source/s?defs=ComputerName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ComputerName</a> -<a href="/source/s?defs=ScriptBlock" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ScriptBlock</a> { 173eeb7e5b3SAdam Hornáček<a class="l" name="167" href="#167">167</a><span class='fold-space'> </span> 174eeb7e5b3SAdam Hornáček<a class="l" name="168" href="#168">168</a><span class='fold-space'> </span> $<a class="xv" name="tempFile"/><a href="/source/s?refs=tempFile" class="xv intelliWindow-symbol" data-definition-place="def">tempFile</a> = [<b>System</b>.<a href="/source/s?defs=IO" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IO</a>.<a class="d intelliWindow-symbol" href="#Path" data-definition-place="defined-in-file">Path</a>]::<a href="/source/s?defs=GetTempFileName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetTempFileName</a>() 175eeb7e5b3SAdam Hornáček<a class="l" name="169" href="#169">169</a><span class='fold-space'> </span> [<b>System</b>.<a href="/source/s?defs=IO" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IO</a>.<a href="/source/s?defs=File" class="intelliWindow-symbol" data-definition-place="undefined-in-file">File</a>]::<a href="/source/s?defs=WriteAllBytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WriteAllBytes</a>($<a class="xv" name="tempFile"/><a href="/source/s?refs=tempFile" class="xv intelliWindow-symbol" data-definition-place="def">tempFile</a>, $<a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>[<span class="n">0</span>]) 176eeb7e5b3SAdam Hornáček<a class="hl" name="170" href="#170">170</a><span class='fold-space'> </span> <b>Write-Verbose</b> <span class="s">"Cert is written to '$<a class="xv" name="tempFile"/><a href="/source/s?refs=tempFile" class="xv intelliWindow-symbol" data-definition-place="def">tempFile</a>'"</span> 177eeb7e5b3SAdam Hornáček<a class="l" name="171" href="#171">171</a><span class='fold-space'> </span> 178eeb7e5b3SAdam Hornáček<a class="l" name="172" href="#172">172</a><span class='fold-space'> </span> } -<a href="/source/s?defs=ArgumentList" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ArgumentList</a> (,$<a class="xv" name="Cert"/><a href="/source/s?refs=Cert" class="xv intelliWindow-symbol" data-definition-place="def">Cert</a>) -<a href="/source/s?defs=Variable" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Variable</a> $<a href="/source/s?defs=variables" class="intelliWindow-symbol" data-definition-place="undefined-in-file">variables</a> 179eeb7e5b3SAdam Hornáček<a class="l" name="173" href="#173">173</a><span class='fold-space'> </span> 180eeb7e5b3SAdam Hornáček<a class="l" name="174" href="#174">174</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Invoke-LabCommand%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Invoke-LabCommand</a> -<a href="/source/s?defs=ActivityName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ActivityName</a> <span class="s">'Importing Cert file'</span> -<a class="xv" name="ComputerName"/><a href="/source/s?refs=ComputerName" class="xv intelliWindow-symbol" data-definition-place="def">ComputerName</a> $<a href="/source/s?defs=ComputerName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ComputerName</a> -<a href="/source/s?defs=ScriptBlock" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ScriptBlock</a> { 181eeb7e5b3SAdam Hornáček<a class="l" name="175" href="#175">175</a><span class='fold-space'> </span> $<a class="xv" name="variables"/><a href="/source/s?refs=variables" class="xv intelliWindow-symbol" data-definition-place="def">variables</a>[<span class="s">'Password'</span>] = $<a href="/source/s?defs=variables" class="intelliWindow-symbol" data-definition-place="undefined-in-file">variables</a>[<span class="s">'Password'</span>] | <b>ConvertTo-SecureString</b> -<a href="/source/s?defs=AsPlainText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">AsPlainText</a> -<a href="/source/s?defs=Force" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Force</a> 182eeb7e5b3SAdam Hornáček<a class="l" name="176" href="#176">176</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Sync-Parameter%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Sync-Parameter</a> -<a href="/source/s?defs=Command" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Command</a> (<b>Get-Command</b> -<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <a href="/source/s?defs=%22Add-Certificate2%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add-Certificate2</a>) 183eeb7e5b3SAdam Hornáček<a class="l" name="177" href="#177">177</a><span class='fold-space'> </span> $<a href="/source/s?defs=ALBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ALBoundParameters</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'Path'</span>, $<a href="/source/s?defs=tempFile" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tempFile</a>) 184eeb7e5b3SAdam Hornáček<a class="l" name="178" href="#178">178</a><span class='fold-space'> </span> $<a href="/source/s?defs=ALBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ALBoundParameters</a>.<a href="/source/s?defs=Remove" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Remove</a>(<span class="s">'Cert'</span>) 185eeb7e5b3SAdam Hornáček<a class="l" name="179" href="#179">179</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Add-Certificate2%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add-Certificate2</a> @<a href="/source/s?defs=ALBoundParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ALBoundParameters</a> | <b>Out-Null</b> 186eeb7e5b3SAdam Hornáček<a class="hl" name="180" href="#180">180</a><span class='fold-space'> </span> <b>Remove-Item</b> -<a class="d intelliWindow-symbol" href="#Path" data-definition-place="defined-in-file">Path</a> $<a class="xv" name="tempFile"/><a href="/source/s?refs=tempFile" class="xv intelliWindow-symbol" data-definition-place="def">tempFile</a> 187eeb7e5b3SAdam Hornáček<a class="l" name="181" href="#181">181</a><span class='fold-space'> </span> 188eeb7e5b3SAdam Hornáček<a class="l" name="182" href="#182">182</a><span class='fold-space'> </span> } -<a href="/source/s?defs=Variable" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Variable</a> $<a class="xv" name="variables"/><a href="/source/s?refs=variables" class="xv intelliWindow-symbol" data-definition-place="def">variables</a> -<b>Function</b> $<a href="/source/s?defs=functions" class="intelliWindow-symbol" data-definition-place="undefined-in-file">functions</a> -<a class="d intelliWindow-symbol" href="#PassThru" data-definition-place="defined-in-file">PassThru</a> 189eeb7e5b3SAdam Hornáček<a class="l" name="183" href="#183">183</a><span class='fold-space'> </span> 190eeb7e5b3SAdam Hornáček<a class="l" name="184" href="#184">184</a><span class='fold-space'> </span> } 191eeb7e5b3SAdam Hornáček<a class="l" name="185" href="#185">185</a><span class='fold-space'> </span> 192eeb7e5b3SAdam Hornáček<a class="l" name="186" href="#186">186</a><span class='fold-space'> </span> <b>end</b> 193eeb7e5b3SAdam Hornáček<a class="l" name="187" href="#187">187</a><span class='fold-space'> </span> { 194eeb7e5b3SAdam Hornáček<a class="l" name="188" href="#188">188</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Write-LogFunctionExit%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Write-LogFunctionExit</a> 195eeb7e5b3SAdam Hornáček<a class="l" name="189" href="#189">189</a><span class='fold-space'> </span> } 196eeb7e5b3SAdam Hornáček<a class="hl" name="190" href="#190">190</a><span class='fold-space'> </span>} 197eeb7e5b3SAdam Hornáček</span><a class="l" name="191" href="#191">191</a><span class='fold-space'> </span><span class="c">#endregion Add-LabCertificate</span> 198eeb7e5b3SAdam Hornáček<a class="l" name="192" href="#192">192</a><span class='fold-space'> </span> 199eeb7e5b3SAdam Hornáček<a class="l" name="193" href="#193">193</a><span class='fold-space'> </span><span class="c"># ...</span> 200eeb7e5b3SAdam Hornáček<a class="l" name="194" href="#194">194</a><span class='fold-space'> </span> 201eeb7e5b3SAdam Hornáček<a class="l" name="195" href="#195">195</a><span class='fold-space'> </span><span class="c">#region Install-LabCAMachine</span> 202eeb7e5b3SAdam Hornáček<span id='scope_id_c3f605d' class='scope-head'><span class='scope-signature'>Install-LabCAMachine()</span><a class="l" name="196" href="#196">196</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_c3f605d_fold_icon'><span class='fold-icon'> </span></a><b>function</b> <a class="xf" name="Install-LabCAMachine"/><a href="/source/s?refs=%22Install-LabCAMachine%22" class="xf intelliWindow-symbol" data-definition-place="def">Install-LabCAMachine</a></span> 203eeb7e5b3SAdam Hornáček<span id='scope_id_c3f605d_fold' class='scope-body'><a class="l" name="197" href="#197">197</a><span class='fold-space'> </span>{ 204eeb7e5b3SAdam Hornáček<a class="l" name="198" href="#198">198</a><span class='fold-space'> </span> <span class="c"># .ExternalHelp <a href="/source/s?path=AutomatedLab.Help.xml">AutomatedLab.Help.xml</a></span> 205eeb7e5b3SAdam Hornáček<a class="l" name="199" href="#199">199</a><span class='fold-space'> </span> [<a href="/source/s?defs=CmdletBinding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CmdletBinding</a>()] 206eeb7e5b3SAdam Hornáček<a class="hl" name="200" href="#200">200</a><span class='fold-space'> </span> 207eeb7e5b3SAdam Hornáček<a class="l" name="201" href="#201">201</a><span class='fold-space'> </span> <b>param</b> ( 208eeb7e5b3SAdam Hornáček<a class="l" name="202" href="#202">202</a><span class='fold-space'> </span> [<a href="/source/s?defs=Parameter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Parameter</a>(<a href="/source/s?defs=Mandatory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mandatory</a>)] 209eeb7e5b3SAdam Hornáček<a class="l" name="203" href="#203">203</a><span class='fold-space'> </span> [<a href="/source/s?defs=AutomatedLab" class="intelliWindow-symbol" data-definition-place="undefined-in-file">AutomatedLab</a>.<a class="xv" name="Machine"/><a href="/source/s?refs=Machine" class="xv intelliWindow-symbol" data-definition-place="def">Machine</a>]$<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>, 210eeb7e5b3SAdam Hornáček<a class="l" name="204" href="#204">204</a><span class='fold-space'> </span> 211eeb7e5b3SAdam Hornáček<a class="l" name="205" href="#205">205</a><span class='fold-space'> </span> [<b>int</b>]$<a class="xv" name="PreDelaySeconds"/><a href="/source/s?refs=PreDelaySeconds" class="xv intelliWindow-symbol" data-definition-place="def">PreDelaySeconds</a>, 212eeb7e5b3SAdam Hornáček<a class="l" name="206" href="#206">206</a><span class='fold-space'> </span> 213eeb7e5b3SAdam Hornáček<a class="l" name="207" href="#207">207</a><span class='fold-space'> </span> [<b>switch</b>]$<a class="xv" name="PassThru"/><a href="/source/s?refs=PassThru" class="xv intelliWindow-symbol" data-definition-place="def">PassThru</a> 214eeb7e5b3SAdam Hornáček<a class="l" name="208" href="#208">208</a><span class='fold-space'> </span> ) 215eeb7e5b3SAdam Hornáček<a class="l" name="209" href="#209">209</a><span class='fold-space'> </span> 216eeb7e5b3SAdam Hornáček<a class="hl" name="210" href="#210">210</a><span class='fold-space'> </span> <a href="/source/s?defs=%22Write-LogFunctionEntry%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Write-LogFunctionEntry</a> 217eeb7e5b3SAdam Hornáček<a class="l" name="211" href="#211">211</a><span class='fold-space'> </span> 218eeb7e5b3SAdam Hornáček<a class="l" name="212" href="#212">212</a><span class='fold-space'> </span> <b>Write-Verbose</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'****************************************************'</span> 219eeb7e5b3SAdam Hornáček<a class="l" name="213" href="#213">213</a><span class='fold-space'> </span> <b>Write-Verbose</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Starting installation of machine: </span>$($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">name</a>)<span class="s">"</span> 220eeb7e5b3SAdam Hornáček<a class="l" name="214" href="#214">214</a><span class='fold-space'> </span> <b>Write-Verbose</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'****************************************************'</span> 221eeb7e5b3SAdam Hornáček<a class="l" name="215" href="#215">215</a><span class='fold-space'> </span> 222eeb7e5b3SAdam Hornáček<a class="l" name="216" href="#216">216</a><span class='fold-space'> </span> $<a class="xv" name="role"/><a href="/source/s?refs=role" class="xv intelliWindow-symbol" data-definition-place="def">role</a> = $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=Roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Roles</a> | <b>Where-Object</b> { $<b>_</b>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> ([<a href="/source/s?defs=AutomatedLab" class="intelliWindow-symbol" data-definition-place="undefined-in-file">AutomatedLab</a>.<a href="/source/s?defs=Roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Roles</a>]::<a href="/source/s?defs=CaRoot" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CaRoot</a>) <b>-or</b> $<b>_</b>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> ([<a href="/source/s?defs=AutomatedLab" class="intelliWindow-symbol" data-definition-place="undefined-in-file">AutomatedLab</a>.<a href="/source/s?defs=Roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Roles</a>]::<a href="/source/s?defs=CaSubordinate" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CaSubordinate</a>) } 223eeb7e5b3SAdam Hornáček<a class="l" name="217" href="#217">217</a><span class='fold-space'> </span> 224eeb7e5b3SAdam Hornáček<a class="l" name="218" href="#218">218</a><span class='fold-space'> </span> $<b>param</b> = [<a href="/source/s?defs=ordered" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ordered</a>]@{ } 225eeb7e5b3SAdam Hornáček<a class="l" name="219" href="#219">219</a><span class='fold-space'> </span> 226eeb7e5b3SAdam Hornáček<a class="hl" name="220" href="#220">220</a><span class='fold-space'> </span> <span class="c">#region - Locate admin username and password for machine</span> 227eeb7e5b3SAdam Hornáček<a class="l" name="221" href="#221">221</a><span class='fold-space'> </span> <b>if</b> ($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=IsDomainJoined" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IsDomainJoined</a>) 228eeb7e5b3SAdam Hornáček<a class="l" name="222" href="#222">222</a><span class='fold-space'> </span> { 229eeb7e5b3SAdam Hornáček<a class="l" name="223" href="#223">223</a><span class='fold-space'> </span> $<a class="xv" name="domain"/><a href="/source/s?refs=domain" class="xv intelliWindow-symbol" data-definition-place="def">domain</a> = $<a href="/source/s?defs=lab" class="intelliWindow-symbol" data-definition-place="undefined-in-file">lab</a>.<a href="/source/s?defs=Domains" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Domains</a> | <b>Where-Object</b> { $<b>_</b>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a> } 230eeb7e5b3SAdam Hornáček<a class="l" name="224" href="#224">224</a><span class='fold-space'> </span> 231eeb7e5b3SAdam Hornáček<a class="l" name="225" href="#225">225</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'UserName'</span>, (<span class="s">'{0}\{1}'</span> <b>-f</b> $<a class="d intelliWindow-symbol" href="#domain" data-definition-place="defined-in-file">domain</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a>, $<a class="d intelliWindow-symbol" href="#domain" data-definition-place="defined-in-file">domain</a>.<a href="/source/s?defs=Administrator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Administrator</a>.<a href="/source/s?defs=UserName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UserName</a>)) 232eeb7e5b3SAdam Hornáček<a class="l" name="226" href="#226">226</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'Password'</span>, $<a class="d intelliWindow-symbol" href="#domain" data-definition-place="defined-in-file">domain</a>.<a href="/source/s?defs=Administrator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Administrator</a>.<a href="/source/s?defs=Password" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Password</a>) 233eeb7e5b3SAdam Hornáček<a class="l" name="227" href="#227">227</a><span class='fold-space'> </span> 234eeb7e5b3SAdam Hornáček<a class="l" name="228" href="#228">228</a><span class='fold-space'> </span> $<a class="xv" name="rootDc"/><a href="/source/s?refs=rootDc" class="xv intelliWindow-symbol" data-definition-place="def">rootDc</a> = <a href="/source/s?defs=%22Get-LabMachine%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Get-LabMachine</a> -<a href="/source/s?defs=Role" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Role</a> <a href="/source/s?defs=RootDC" class="intelliWindow-symbol" data-definition-place="undefined-in-file">RootDC</a> | <b>Where-Object</b> <a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a> <b>-eq</b> $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a> 235eeb7e5b3SAdam Hornáček<a class="l" name="229" href="#229">229</a><span class='fold-space'> </span> <b>if</b> ($<a class="xv" name="rootDc"/><a href="/source/s?refs=rootDc" class="xv intelliWindow-symbol" data-definition-place="def">rootDc</a>) <span class="c">#if there is a root domain controller in the same domain as the machine</span> 236eeb7e5b3SAdam Hornáček<a class="hl" name="230" href="#230">230</a><span class='fold-space'> </span> { 237eeb7e5b3SAdam Hornáček<a class="l" name="231" href="#231">231</a><span class='fold-space'> </span> $<a class="xv" name="rootDomain"/><a href="/source/s?refs=rootDomain" class="xv intelliWindow-symbol" data-definition-place="def">rootDomain</a> = (<a href="/source/s?defs=%22Get-Lab%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Get-Lab</a>).<a href="/source/s?defs=Domains" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Domains</a> | <b>Where-Object</b> <a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> $<a href="/source/s?defs=rootDc" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDc</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a> 238eeb7e5b3SAdam Hornáček<a class="l" name="232" href="#232">232</a><span class='fold-space'> </span> $<a class="xv" name="rootDomainNetBIOSName"/><a href="/source/s?refs=rootDomainNetBIOSName" class="xv intelliWindow-symbol" data-definition-place="def">rootDomainNetBIOSName</a> = ($<a href="/source/s?defs=rootDomain" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDomain</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-split</b> <span class="s">'\.'</span>)[<span class="n">0</span>] 239eeb7e5b3SAdam Hornáček<a class="l" name="233" href="#233">233</a><span class='fold-space'> </span> } 240eeb7e5b3SAdam Hornáček<a class="l" name="234" href="#234">234</a><span class='fold-space'> </span> <b>else</b> <span class="c">#else the machine is in a child domain and the parent domain need to be used for the query</span> 241eeb7e5b3SAdam Hornáček<a class="l" name="235" href="#235">235</a><span class='fold-space'> </span> { 242eeb7e5b3SAdam Hornáček<a class="l" name="236" href="#236">236</a><span class='fold-space'> </span> $<a class="xv" name="rootDomain"/><a href="/source/s?refs=rootDomain" class="xv intelliWindow-symbol" data-definition-place="def">rootDomain</a> = $<a href="/source/s?defs=lab" class="intelliWindow-symbol" data-definition-place="undefined-in-file">lab</a>.<a href="/source/s?defs=GetParentDomain" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetParentDomain</a>($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a>) 243eeb7e5b3SAdam Hornáček<a class="l" name="237" href="#237">237</a><span class='fold-space'> </span> $<a class="xv" name="rootDomainNetBIOSName"/><a href="/source/s?refs=rootDomainNetBIOSName" class="xv intelliWindow-symbol" data-definition-place="def">rootDomainNetBIOSName</a> = ($<a href="/source/s?defs=rootDomain" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDomain</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-split</b> <span class="s">'\.'</span>)[<span class="n">0</span>] 244eeb7e5b3SAdam Hornáček<a class="l" name="238" href="#238">238</a><span class='fold-space'> </span> $<a class="xv" name="rootDc"/><a href="/source/s?refs=rootDc" class="xv intelliWindow-symbol" data-definition-place="def">rootDc</a> = <a href="/source/s?defs=%22Get-LabMachine%22" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Get-LabMachine</a> -<a href="/source/s?defs=Role" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Role</a> <a href="/source/s?defs=RootDC" class="intelliWindow-symbol" data-definition-place="undefined-in-file">RootDC</a> | <b>Where-Object</b> <a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a> <b>-eq</b> $<a href="/source/s?defs=rootDomain" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDomain</a> 245eeb7e5b3SAdam Hornáček<a class="l" name="239" href="#239">239</a><span class='fold-space'> </span> } 246eeb7e5b3SAdam Hornáček<a class="hl" name="240" href="#240">240</a><span class='fold-space'> </span> 247eeb7e5b3SAdam Hornáček<a class="l" name="241" href="#241">241</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ForestAdminUserName'</span>, (<span class="s">'{0}\{1}'</span> <b>-f</b> $<a href="/source/s?defs=rootDomainNetBIOSName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDomainNetBIOSName</a>, $<a href="/source/s?defs=rootDomain" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDomain</a>.<a href="/source/s?defs=Administrator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Administrator</a>.<a href="/source/s?defs=UserName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UserName</a>)) 248eeb7e5b3SAdam Hornáček<a class="l" name="242" href="#242">242</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ForestAdminPassword'</span>, $<a href="/source/s?defs=rootDomain" class="intelliWindow-symbol" data-definition-place="undefined-in-file">rootDomain</a>.<a href="/source/s?defs=Administrator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Administrator</a>.<a href="/source/s?defs=Password" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Password</a>) 249eeb7e5b3SAdam Hornáček<a class="l" name="243" href="#243">243</a><span class='fold-space'> </span> 250eeb7e5b3SAdam Hornáček<a class="l" name="244" href="#244">244</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Machine : </span>$($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">name</a>)<span class="s">"</span> 251eeb7e5b3SAdam Hornáček<a class="l" name="245" href="#245">245</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Machine Domain : </span>$($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a>)<span class="s">"</span> 252eeb7e5b3SAdam Hornáček<a class="l" name="246" href="#246">246</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Username for job : </span>$($<b>param</b>.<a href="/source/s?defs=username" class="intelliWindow-symbol" data-definition-place="undefined-in-file">username</a>)<span class="s">"</span> 253eeb7e5b3SAdam Hornáček<a class="l" name="247" href="#247">247</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Password for job : </span>$($<b>param</b>.<a href="/source/s?defs=Password" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Password</a>)<span class="s">"</span> 254eeb7e5b3SAdam Hornáček<a class="l" name="248" href="#248">248</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"ForestAdmin Username : </span>$($<b>param</b>.<a href="/source/s?defs=ForestAdminUserName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ForestAdminUserName</a>)<span class="s">"</span> 255eeb7e5b3SAdam Hornáček<a class="l" name="249" href="#249">249</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"ForestAdmin Password : </span>$($<b>param</b>.<a href="/source/s?defs=ForestAdminPassword" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ForestAdminPassword</a>)<span class="s">"</span> 256eeb7e5b3SAdam Hornáček<a class="hl" name="250" href="#250">250</a><span class='fold-space'> </span> } 257eeb7e5b3SAdam Hornáček<a class="l" name="251" href="#251">251</a><span class='fold-space'> </span> <b>else</b> 258eeb7e5b3SAdam Hornáček<a class="l" name="252" href="#252">252</a><span class='fold-space'> </span> { 259eeb7e5b3SAdam Hornáček<a class="l" name="253" href="#253">253</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'UserName'</span>, (<span class="s">'{0}\{1}'</span> <b>-f</b> $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a>, $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=InstallationUser" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InstallationUser</a>.<a href="/source/s?defs=UserName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UserName</a>)) 260eeb7e5b3SAdam Hornáček<a class="l" name="254" href="#254">254</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'Password'</span>, $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=InstallationUser" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InstallationUser</a>.<a href="/source/s?defs=Password" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Password</a>) 261eeb7e5b3SAdam Hornáček<a class="l" name="255" href="#255">255</a><span class='fold-space'> </span> } 262eeb7e5b3SAdam Hornáček<a class="l" name="256" href="#256">256</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ComputerName'</span>, $<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a>) 263eeb7e5b3SAdam Hornáček<a class="l" name="257" href="#257">257</a><span class='fold-space'> </span> <span class="c">#endregion</span> 264eeb7e5b3SAdam Hornáček<a class="l" name="258" href="#258">258</a><span class='fold-space'> </span> 265eeb7e5b3SAdam Hornáček<a class="l" name="259" href="#259">259</a><span class='fold-space'> </span> 266eeb7e5b3SAdam Hornáček<a class="hl" name="260" href="#260">260</a><span class='fold-space'> </span> 267eeb7e5b3SAdam Hornáček<a class="l" name="261" href="#261">261</a><span class='fold-space'> </span> <span class="c">#region - Determine DNS name for machine. This is used when installing Enterprise CAs</span> 268eeb7e5b3SAdam Hornáček<a class="l" name="262" href="#262">262</a><span class='fold-space'> </span> $<a class="xv" name="caDNSName"/><a href="/source/s?refs=caDNSName" class="xv intelliWindow-symbol" data-definition-place="def">caDNSName</a> = $<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> 269eeb7e5b3SAdam Hornáček<a class="l" name="263" href="#263">263</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a>) { $<a class="d intelliWindow-symbol" href="#caDNSName" data-definition-place="defined-in-file">caDNSName</a> += (<span class="s">'.'</span> + $<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a>) } 270eeb7e5b3SAdam Hornáček<a class="l" name="264" href="#264">264</a><span class='fold-space'> </span> 271eeb7e5b3SAdam Hornáček<a class="l" name="265" href="#265">265</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a>) 272eeb7e5b3SAdam Hornáček<a class="l" name="266" href="#266">266</a><span class='fold-space'> </span> { 273eeb7e5b3SAdam Hornáček<a class="l" name="267" href="#267">267</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'DomainName'</span>, $<a class="d intelliWindow-symbol" href="#Machine" data-definition-place="defined-in-file">Machine</a>.<a href="/source/s?defs=DomainName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DomainName</a>) 274eeb7e5b3SAdam Hornáček<a class="l" name="268" href="#268">268</a><span class='fold-space'> </span> } 275eeb7e5b3SAdam Hornáček<a class="l" name="269" href="#269">269</a><span class='fold-space'> </span> <b>else</b> 276eeb7e5b3SAdam Hornáček<a class="hl" name="270" href="#270">270</a><span class='fold-space'> </span> { 277eeb7e5b3SAdam Hornáček<a class="l" name="271" href="#271">271</a><span class='fold-space'> </span> $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'DomainName'</span>, <span class="s">''</span>) 278eeb7e5b3SAdam Hornáček<a class="l" name="272" href="#272">272</a><span class='fold-space'> </span> } 279eeb7e5b3SAdam Hornáček<a class="l" name="273" href="#273">273</a><span class='fold-space'> </span> 280eeb7e5b3SAdam Hornáček<a class="l" name="274" href="#274">274</a><span class='fold-space'> </span> 281eeb7e5b3SAdam Hornáček<a class="l" name="275" href="#275">275</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> <span class="s">'CaSubordinate'</span>) 282eeb7e5b3SAdam Hornáček<a class="l" name="276" href="#276">276</a><span class='fold-space'> </span> { 283eeb7e5b3SAdam Hornáček<a class="l" name="277" href="#277">277</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'ParentCA'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ParentCA'</span>, <span class="s">'<auto>'</span>) } 284eeb7e5b3SAdam Hornáček<a class="l" name="278" href="#278">278</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ParentCA'</span>, $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ParentCA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParentCA</a>) } 285eeb7e5b3SAdam Hornáček<a class="l" name="279" href="#279">279</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'ParentCALogicalName'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ParentCALogicalName'</span>, <span class="s">'<auto>'</span>) } 286eeb7e5b3SAdam Hornáček<a class="hl" name="280" href="#280">280</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'ParentCALogicalName'</span>, $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ParentCALogicalName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParentCALogicalName</a>) } 287eeb7e5b3SAdam Hornáček<a class="l" name="281" href="#281">281</a><span class='fold-space'> </span> } 288eeb7e5b3SAdam Hornáček<a class="l" name="282" href="#282">282</a><span class='fold-space'> </span> 289eeb7e5b3SAdam Hornáček<a class="l" name="283" href="#283">283</a><span class='fold-space'> </span> <span class="c">#...</span> 290eeb7e5b3SAdam Hornáček<a class="l" name="284" href="#284">284</a><span class='fold-space'> </span> 291eeb7e5b3SAdam Hornáček<a class="l" name="285" href="#285">285</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'CPSURL'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'CPSURL'</span>, <span class="s">'<a href="http://">http://</a>'</span> + $<a class="d intelliWindow-symbol" href="#caDNSName" data-definition-place="defined-in-file">caDNSName</a> + <span class="s">'/<a href="/source/s?path=/cps/">cps</a>/<a href="/source/s?path=/cps/cps.html">cps.html</a>'</span>) } 292eeb7e5b3SAdam Hornáček<a class="l" name="286" href="#286">286</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'CPSURL'</span>, $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=CPSURL" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CPSURL</a>) } 293eeb7e5b3SAdam Hornáček<a class="l" name="287" href="#287">287</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'CPSText'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'CPSText'</span>, <span class="s">'Certification Practice Statement'</span>) } 294eeb7e5b3SAdam Hornáček<a class="l" name="288" href="#288">288</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'CPSText'</span>, $($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=CPSText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CPSText</a>)) } 295eeb7e5b3SAdam Hornáček<a class="l" name="289" href="#289">289</a><span class='fold-space'> </span> 296eeb7e5b3SAdam Hornáček<a class="hl" name="290" href="#290">290</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'InstallOCSP'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'InstallOCSP'</span>, <span class="s">'<auto>'</span>) } 297eeb7e5b3SAdam Hornáček<a class="l" name="291" href="#291">291</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'InstallOCSP'</span>, ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=InstallOCSP" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InstallOCSP</a> <b>-like</b> <span class="s">'*Y*'</span>)) } 298eeb7e5b3SAdam Hornáček<a class="l" name="292" href="#292">292</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'OCSPHTTPURL01'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'OCSPHTTPURL01'</span>, <span class="s">'<auto>'</span>) } 299eeb7e5b3SAdam Hornáček<a class="l" name="293" href="#293">293</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'OCSPHTTPURL01'</span>, $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=OCSPHTTPURL01" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OCSPHTTPURL01</a>) } 300eeb7e5b3SAdam Hornáček<a class="l" name="294" href="#294">294</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'OCSPHTTPURL02'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'OCSPHTTPURL02'</span>, <span class="s">'<auto>'</span>) } 301eeb7e5b3SAdam Hornáček<a class="l" name="295" href="#295">295</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'OCSPHTTPURL02'</span>, $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=OCSPHTTPURL02" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OCSPHTTPURL02</a>) } 302eeb7e5b3SAdam Hornáček<a class="l" name="296" href="#296">296</a><span class='fold-space'> </span> 303eeb7e5b3SAdam Hornáček<a class="l" name="297" href="#297">297</a><span class='fold-space'> </span> <b>if</b> (!($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'DoNotLoadDefaultTemplates'</span>))) { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'DoNotLoadDefaultTemplates'</span>, <span class="s">'<auto>'</span>) } 304eeb7e5b3SAdam Hornáček<a class="l" name="298" href="#298">298</a><span class='fold-space'> </span> <b>else</b> { $<b>param</b>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a>(<span class="s">'DoNotLoadDefaultTemplates'</span>, $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=DoNotLoadDefaultTemplates" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DoNotLoadDefaultTemplates</a> <b>-like</b> <span class="s">'*Y*'</span>) } 305eeb7e5b3SAdam Hornáček<a class="l" name="299" href="#299">299</a><span class='fold-space'> </span> 306eeb7e5b3SAdam Hornáček<a class="hl" name="300" href="#300">300</a><span class='fold-space'> </span> 307eeb7e5b3SAdam Hornáček<a class="l" name="301" href="#301">301</a><span class='fold-space'> </span> <span class="c">#region - Check if any unknown parameter name was passed</span> 308eeb7e5b3SAdam Hornáček<a class="l" name="302" href="#302">302</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> = @() 309eeb7e5b3SAdam Hornáček<a class="l" name="303" href="#303">303</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> += <span class="s">'ParentCA (only valid for Subordinate CA. Ignored for Root CAs)'</span> 310eeb7e5b3SAdam Hornáček<a class="l" name="304" href="#304">304</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> += <span class="s">'ParentCALogicalName (only valid for Subordinate CAs. Ignored for Root CAs)'</span> 311eeb7e5b3SAdam Hornáček<a class="l" name="305" href="#305">305</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> += <span class="s">'CACommonName'</span> 312eeb7e5b3SAdam Hornáček<a class="l" name="306" href="#306">306</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> += <span class="s">'CAType'</span> 313eeb7e5b3SAdam Hornáček<a class="l" name="307" href="#307">307</a><span class='fold-space'> </span> <span class="c">#...</span> 314eeb7e5b3SAdam Hornáček<a class="l" name="308" href="#308">308</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> += <span class="s">'DoNotLoadDefaultTemplates'</span> 315eeb7e5b3SAdam Hornáček<a class="l" name="309" href="#309">309</a><span class='fold-space'> </span> $<a class="xv" name="knownParameters"/><a href="/source/s?refs=knownParameters" class="xv intelliWindow-symbol" data-definition-place="def">knownParameters</a> += <span class="s">'PreDelaySeconds'</span> 316eeb7e5b3SAdam Hornáček<a class="hl" name="310" href="#310">310</a><span class='fold-space'> </span> $<a class="xv" name="unkownParFound"/><a href="/source/s?refs=unkownParFound" class="xv intelliWindow-symbol" data-definition-place="def">unkownParFound</a> = $<b>false</b> 317eeb7e5b3SAdam Hornáček<a class="l" name="311" href="#311">311</a><span class='fold-space'> </span> <b>foreach</b> ($<a class="xv" name="keySet"/><a href="/source/s?refs=keySet" class="xv intelliWindow-symbol" data-definition-place="def">keySet</a> <b>in</b> $<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=GetEnumerator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetEnumerator</a>()) 318eeb7e5b3SAdam Hornáček<a class="l" name="312" href="#312">312</a><span class='fold-space'> </span> { 319eeb7e5b3SAdam Hornáček<a class="l" name="313" href="#313">313</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#keySet" data-definition-place="defined-in-file">keySet</a>.<a href="/source/s?defs=Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Key</a> -<a href="/source/s?defs=cnotin" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cnotin</a> $<a href="/source/s?defs=knownParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">knownParameters</a>) 320eeb7e5b3SAdam Hornáček<a class="l" name="314" href="#314">314</a><span class='fold-space'> </span> { 321eeb7e5b3SAdam Hornáček<a class="l" name="315" href="#315">315</a><span class='fold-space'> </span> <b>Write-Warning</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Parameter name '</span>$($<a class="d intelliWindow-symbol" href="#keySet" data-definition-place="defined-in-file">keySet</a>.<a href="/source/s?defs=Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Key</a>)<span class="s">' is <a href="/source/s?path=unknown/">unknown</a>/<a href="/source/s?path=unknown/ignored">ignored</a>)"</span> 322eeb7e5b3SAdam Hornáček<a class="l" name="316" href="#316">316</a><span class='fold-space'> </span> $<a class="xv" name="unkownParFound"/><a href="/source/s?refs=unkownParFound" class="xv intelliWindow-symbol" data-definition-place="def">unkownParFound</a> = $<b>true</b> 323eeb7e5b3SAdam Hornáček<a class="l" name="317" href="#317">317</a><span class='fold-space'> </span> } 324eeb7e5b3SAdam Hornáček<a class="l" name="318" href="#318">318</a><span class='fold-space'> </span> } 325eeb7e5b3SAdam Hornáček<a class="l" name="319" href="#319">319</a><span class='fold-space'> </span> <b>if</b> ($<a class="xv" name="unkownParFound"/><a href="/source/s?refs=unkownParFound" class="xv intelliWindow-symbol" data-definition-place="def">unkownParFound</a>) 326eeb7e5b3SAdam Hornáček<a class="hl" name="320" href="#320">320</a><span class='fold-space'> </span> { 327eeb7e5b3SAdam Hornáček<a class="l" name="321" href="#321">321</a><span class='fold-space'> </span> <b>Write-Warning</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'Valid parameter names are:'</span> 328eeb7e5b3SAdam Hornáček<a class="l" name="322" href="#322">322</a><span class='fold-space'> </span> <b>Foreach</b> ($<a class="xv" name="name"/><a href="/source/s?refs=name" class="xv intelliWindow-symbol" data-definition-place="def">name</a> <b>in</b> ($<a href="/source/s?defs=knownParameters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">knownParameters</a>.<a href="/source/s?defs=GetEnumerator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetEnumerator</a>())) 329eeb7e5b3SAdam Hornáček<a class="l" name="323" href="#323">323</a><span class='fold-space'> </span> { 330eeb7e5b3SAdam Hornáček<a class="l" name="324" href="#324">324</a><span class='fold-space'> </span> <b>Write-Warning</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">" </span>$($<a class="xv" name="name"/><a href="/source/s?refs=name" class="xv intelliWindow-symbol" data-definition-place="def">name</a>)<span class="s">"</span> 331eeb7e5b3SAdam Hornáček<a class="l" name="325" href="#325">325</a><span class='fold-space'> </span> } 332eeb7e5b3SAdam Hornáček<a class="l" name="326" href="#326">326</a><span class='fold-space'> </span> <b>Write-Warning</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'NOTE that all parameter names are CASE SENSITIVE!'</span> 333eeb7e5b3SAdam Hornáček<a class="l" name="327" href="#327">327</a><span class='fold-space'> </span> } 334eeb7e5b3SAdam Hornáček<a class="l" name="328" href="#328">328</a><span class='fold-space'> </span> <span class="c">#endregion - Check if any unknown parameter names was passed</span> 335eeb7e5b3SAdam Hornáček<a class="l" name="329" href="#329">329</a><span class='fold-space'> </span> 336eeb7e5b3SAdam Hornáček<a class="hl" name="330" href="#330">330</a><span class='fold-space'> </span> <span class="c">#endregion - Parameters</span> 337eeb7e5b3SAdam Hornáček<a class="l" name="331" href="#331">331</a><span class='fold-space'> </span> 338eeb7e5b3SAdam Hornáček<a class="l" name="332" href="#332">332</a><span class='fold-space'> </span> 339eeb7e5b3SAdam Hornáček<a class="l" name="333" href="#333">333</a><span class='fold-space'> </span> <span class="c">#region - Parameters debug</span> 340eeb7e5b3SAdam Hornáček<a class="l" name="334" href="#334">334</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'---------------------------------------------------------------------------------------'</span> 341eeb7e5b3SAdam Hornáček<a class="l" name="335" href="#335">335</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Parameters for </span>$($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">name</a>)<span class="s">"</span> 342eeb7e5b3SAdam Hornáček<a class="l" name="336" href="#336">336</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'---------------------------------------------------------------------------------------'</span> 343eeb7e5b3SAdam Hornáček<a class="l" name="337" href="#337">337</a><span class='fold-space'> </span> <b>if</b> ($<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=Roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Roles</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=GetEnumerator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetEnumerator</a>().<a href="/source/s?defs=Count" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Count</a>) 344eeb7e5b3SAdam Hornáček<a class="l" name="338" href="#338">338</a><span class='fold-space'> </span> { 345eeb7e5b3SAdam Hornáček<a class="l" name="339" href="#339">339</a><span class='fold-space'> </span> <b>foreach</b> ($<a class="xv" name="r"/><a href="/source/s?refs=r" class="xv intelliWindow-symbol" data-definition-place="def">r</a> <b>in</b> $<a href="/source/s?defs=machine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">machine</a>.<a href="/source/s?defs=Roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Roles</a>) 346eeb7e5b3SAdam Hornáček<a class="hl" name="340" href="#340">340</a><span class='fold-space'> </span> { 347eeb7e5b3SAdam Hornáček<a class="l" name="341" href="#341">341</a><span class='fold-space'> </span> <b>if</b> (([<a href="/source/s?defs=AutomatedLab" class="intelliWindow-symbol" data-definition-place="undefined-in-file">AutomatedLab</a>.<a href="/source/s?defs=Roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Roles</a>]$<a class="d intelliWindow-symbol" href="#r" data-definition-place="defined-in-file">r</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-band</b> $<a href="/source/s?defs=roles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">roles</a>) <b>-ne</b> <span class="n">0</span>) <span class="c">#if this is a CA role</span> 348eeb7e5b3SAdam Hornáček<a class="l" name="342" href="#342">342</a><span class='fold-space'> </span> { 349eeb7e5b3SAdam Hornáček<a class="l" name="343" href="#343">343</a><span class='fold-space'> </span> <b>foreach</b> ($<a class="xv" name="key"/><a href="/source/s?refs=key" class="xv intelliWindow-symbol" data-definition-place="def">key</a> <b>in</b> ($<a class="d intelliWindow-symbol" href="#r" data-definition-place="defined-in-file">r</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=GetEnumerator" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetEnumerator</a>() | <b>Sort-Object</b> -<a href="/source/s?defs=Property" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Property</a> <a href="/source/s?defs=Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Key</a>)) 350eeb7e5b3SAdam Hornáček<a class="l" name="344" href="#344">344</a><span class='fold-space'> </span> { 351eeb7e5b3SAdam Hornáček<a class="l" name="345" href="#345">345</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">" </span>$($<a class="d intelliWindow-symbol" href="#key" data-definition-place="defined-in-file">key</a>.<a href="/source/s?defs=Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Key</a>.<a href="/source/s?defs=PadRight" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PadRight</a>(<span class="n">27</span>))<span class="s"> </span>$($<a class="d intelliWindow-symbol" href="#key" data-definition-place="defined-in-file">key</a>.<a href="/source/s?defs=Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Value</a>)<span class="s">"</span> 352eeb7e5b3SAdam Hornáček<a class="l" name="346" href="#346">346</a><span class='fold-space'> </span> } 353eeb7e5b3SAdam Hornáček<a class="l" name="347" href="#347">347</a><span class='fold-space'> </span> } 354eeb7e5b3SAdam Hornáček<a class="l" name="348" href="#348">348</a><span class='fold-space'> </span> } 355eeb7e5b3SAdam Hornáček<a class="l" name="349" href="#349">349</a><span class='fold-space'> </span> } 356eeb7e5b3SAdam Hornáček<a class="hl" name="350" href="#350">350</a><span class='fold-space'> </span> <b>else</b> 357eeb7e5b3SAdam Hornáček<a class="l" name="351" href="#351">351</a><span class='fold-space'> </span> { 358eeb7e5b3SAdam Hornáček<a class="l" name="352" href="#352">352</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">message</a> <span class="s">' No parameters specified'</span> 359eeb7e5b3SAdam Hornáček<a class="l" name="353" href="#353">353</a><span class='fold-space'> </span> } 360eeb7e5b3SAdam Hornáček<a class="l" name="354" href="#354">354</a><span class='fold-space'> </span> <b>Write-Debug</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'---------------------------------------------------------------------------------------'</span> 361eeb7e5b3SAdam Hornáček<a class="l" name="355" href="#355">355</a><span class='fold-space'> </span> <span class="c">#endregion - Parameters debug</span> 362eeb7e5b3SAdam Hornáček<a class="l" name="356" href="#356">356</a><span class='fold-space'> </span> 363eeb7e5b3SAdam Hornáček<a class="l" name="357" href="#357">357</a><span class='fold-space'> </span> 364eeb7e5b3SAdam Hornáček<a class="l" name="358" href="#358">358</a><span class='fold-space'> </span> <span class="c">#region ----- Input validation (raw values) -----</span> 365eeb7e5b3SAdam Hornáček<a class="l" name="359" href="#359">359</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'CACommonName'</span>) <b>-and</b> ($<b>param</b>.<a href="/source/s?defs=CACommonName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CACommonName</a>.<a href="/source/s?defs=Length" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Length</a> <b>-gt</b> <span class="n">37</span>)) 366eeb7e5b3SAdam Hornáček<a class="hl" name="360" href="#360">360</a><span class='fold-space'> </span> { 367eeb7e5b3SAdam Hornáček<a class="l" name="361" href="#361">361</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"CACommonName cannot be longer than 37 characters. Specified value is: '</span>$($<b>param</b>.<a href="/source/s?defs=CACommonName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CACommonName</a>)<span class="s">'"</span>; <b>return</b> 368eeb7e5b3SAdam Hornáček<a class="l" name="362" href="#362">362</a><span class='fold-space'> </span> } 369eeb7e5b3SAdam Hornáček<a class="l" name="363" href="#363">363</a><span class='fold-space'> </span> 370eeb7e5b3SAdam Hornáček<a class="l" name="364" href="#364">364</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'CACommonName'</span>) <b>-and</b> ($<b>param</b>.<a href="/source/s?defs=CACommonName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CACommonName</a>.<a href="/source/s?defs=Length" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Length</a> <b>-lt</b> <span class="n">1</span>)) 371eeb7e5b3SAdam Hornáček<a class="l" name="365" href="#365">365</a><span class='fold-space'> </span> { 372eeb7e5b3SAdam Hornáček<a class="l" name="366" href="#366">366</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"CACommonName cannot be blank. Specified value is: '</span>$($<b>param</b>.<a href="/source/s?defs=CACommonName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CACommonName</a>)<span class="s">'"</span>; <b>return</b> 373eeb7e5b3SAdam Hornáček<a class="l" name="367" href="#367">367</a><span class='fold-space'> </span> } 374eeb7e5b3SAdam Hornáček<a class="l" name="368" href="#368">368</a><span class='fold-space'> </span> 375eeb7e5b3SAdam Hornáček<a class="l" name="369" href="#369">369</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> <span class="s">'CaRoot'</span>) 376eeb7e5b3SAdam Hornáček<a class="hl" name="370" href="#370">370</a><span class='fold-space'> </span> { 377eeb7e5b3SAdam Hornáček<a class="l" name="371" href="#371">371</a><span class='fold-space'> </span> <b>if</b> (<b>-not</b> ($<b>param</b>.<a href="/source/s?defs=CAType" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CAType</a> -<b>in</b> <span class="s">'EnterpriseRootCA'</span>, <span class="s">'StandAloneRootCA'</span>, <span class="s">'<auto>'</span>)) 378eeb7e5b3SAdam Hornáček<a class="l" name="372" href="#372">372</a><span class='fold-space'> </span> { 379eeb7e5b3SAdam Hornáček<a class="l" name="373" href="#373">373</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"CAType needs to be 'EnterpriseRootCA' or 'StandAloneRootCA' when role is CaRoot. Specified value is: '$<b>param</b>.CAType'"</span>; <b>return</b> 380eeb7e5b3SAdam Hornáček<a class="l" name="374" href="#374">374</a><span class='fold-space'> </span> } 381eeb7e5b3SAdam Hornáček<a class="l" name="375" href="#375">375</a><span class='fold-space'> </span> } 382eeb7e5b3SAdam Hornáček<a class="l" name="376" href="#376">376</a><span class='fold-space'> </span> 383eeb7e5b3SAdam Hornáček<a class="l" name="377" href="#377">377</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Name</a> <b>-eq</b> <span class="s">'CaSubordinate'</span>) 384eeb7e5b3SAdam Hornáček<a class="l" name="378" href="#378">378</a><span class='fold-space'> </span> { 385eeb7e5b3SAdam Hornáček<a class="l" name="379" href="#379">379</a><span class='fold-space'> </span> <b>if</b> (<b>-not</b> ($<b>param</b>.<a href="/source/s?defs=CAType" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CAType</a> -<b>in</b> <span class="s">'EnterpriseSubordinateCA'</span>, <span class="s">'StandAloneSubordinateCA'</span>, <span class="s">'<auto>'</span>)) 386eeb7e5b3SAdam Hornáček<a class="hl" name="380" href="#380">380</a><span class='fold-space'> </span> { 387eeb7e5b3SAdam Hornáček<a class="l" name="381" href="#381">381</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"CAType needs to be 'EnterpriseSubordinateCA' or 'StandAloneSubordinateCA' when role is CaSubordinate. Specified value is: '$<b>param</b>.CAType'"</span>; <b>return</b> 388eeb7e5b3SAdam Hornáček<a class="l" name="382" href="#382">382</a><span class='fold-space'> </span> } 389eeb7e5b3SAdam Hornáček<a class="l" name="383" href="#383">383</a><span class='fold-space'> </span> } 390eeb7e5b3SAdam Hornáček<a class="l" name="384" href="#384">384</a><span class='fold-space'> </span> 391eeb7e5b3SAdam Hornáček<a class="l" name="385" href="#385">385</a><span class='fold-space'> </span> 392eeb7e5b3SAdam Hornáček<a class="l" name="386" href="#386">386</a><span class='fold-space'> </span> $<a class="xv" name="availableCombinations"/><a href="/source/s?refs=availableCombinations" class="xv intelliWindow-symbol" data-definition-place="def">availableCombinations</a> = @() 393eeb7e5b3SAdam Hornáček<a class="l" name="387" href="#387">387</a><span class='fold-space'> </span> $<a class="xv" name="availableCombinations"/><a href="/source/s?refs=availableCombinations" class="xv intelliWindow-symbol" data-definition-place="def">availableCombinations</a> += @{<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a>=<span class="s">'Microsoft Base SMart Card Crypto Provider'</span>; <a href="/source/s?defs=HashAlgorithmName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">HashAlgorithmName</a>=<span class="s">'sha1'</span>,<span class="s">'md2'</span>,<span class="s">'md4'</span>,<span class="s">'md5'</span>; <a href="/source/s?defs=KeyLength" class="intelliWindow-symbol" data-definition-place="undefined-in-file">KeyLength</a>=<span class="s">'1024'</span>,<span class="s">'2048'</span>,<span class="s">'4096'</span>} 394eeb7e5b3SAdam Hornáček<a class="l" name="388" href="#388">388</a><span class='fold-space'> </span> <span class="c">#...</span> 395eeb7e5b3SAdam Hornáček<a class="l" name="389" href="#389">389</a><span class='fold-space'> </span> $<a class="xv" name="combination"/><a href="/source/s?refs=combination" class="xv intelliWindow-symbol" data-definition-place="def">combination</a> = $<a href="/source/s?defs=availableCombinations" class="intelliWindow-symbol" data-definition-place="undefined-in-file">availableCombinations</a> | <b>Where-Object</b> {$<b>_</b>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a> <b>-eq</b> $<b>param</b>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a>} 396eeb7e5b3SAdam Hornáček<a class="hl" name="390" href="#390">390</a><span class='fold-space'> </span> 397eeb7e5b3SAdam Hornáček<a class="l" name="391" href="#391">391</a><span class='fold-space'> </span> <b>if</b> (<b>-not</b> ($<b>param</b>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a> -<b>in</b> $<a class="d intelliWindow-symbol" href="#combination" data-definition-place="defined-in-file">combination</a>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a>)) 398eeb7e5b3SAdam Hornáček<a class="l" name="392" href="#392">392</a><span class='fold-space'> </span> { 399eeb7e5b3SAdam Hornáček<a class="l" name="393" href="#393">393</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"CryptoProviderName '</span>$($<b>param</b>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a>)<span class="s">' is unknown. `nList of valid options for CryptoProviderName:`n </span>$($<a href="/source/s?defs=availableCombinations" class="intelliWindow-symbol" data-definition-place="undefined-in-file">availableCombinations</a>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a> <b>-join</b> <span class="s">"`n "</span>)<span class="s">"</span>; <b>return</b> 400eeb7e5b3SAdam Hornáček<a class="l" name="394" href="#394">394</a><span class='fold-space'> </span> } 401eeb7e5b3SAdam Hornáček<a class="l" name="395" href="#395">395</a><span class='fold-space'> </span> <b>elseif</b> (<b>-not</b> ($<b>param</b>.<a href="/source/s?defs=HashAlgorithmName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">HashAlgorithmName</a> -<b>in</b> $<a class="d intelliWindow-symbol" href="#combination" data-definition-place="defined-in-file">combination</a>.<a href="/source/s?defs=HashAlgorithmName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">HashAlgorithmName</a>)) 402eeb7e5b3SAdam Hornáček<a class="l" name="396" href="#396">396</a><span class='fold-space'> </span> { 403eeb7e5b3SAdam Hornáček<a class="l" name="397" href="#397">397</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"HashAlgorithmName '</span>$($<b>param</b>.<a href="/source/s?defs=HashAlgorithmName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">HashAlgorithmName</a>)<span class="s">' is not valid for CryptoProviderName '</span>$($<b>param</b>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a>)<span class="s">'. The Crypto Provider selected supports the following Hash Algorithms:`n </span>$($<a class="d intelliWindow-symbol" href="#combination" data-definition-place="defined-in-file">combination</a>.<a href="/source/s?defs=HashAlgorithmName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">HashAlgorithmName</a> <b>-join</b> <span class="s">"`n "</span>)<span class="s">"</span>; <b>return</b> 404eeb7e5b3SAdam Hornáček<a class="l" name="398" href="#398">398</a><span class='fold-space'> </span> } 405eeb7e5b3SAdam Hornáček<a class="l" name="399" href="#399">399</a><span class='fold-space'> </span> <b>elseif</b> (<b>-not</b> ($<b>param</b>.<a href="/source/s?defs=KeyLength" class="intelliWindow-symbol" data-definition-place="undefined-in-file">KeyLength</a> -<b>in</b> $<a class="d intelliWindow-symbol" href="#combination" data-definition-place="defined-in-file">combination</a>.<a href="/source/s?defs=KeyLength" class="intelliWindow-symbol" data-definition-place="undefined-in-file">KeyLength</a>)) 406eeb7e5b3SAdam Hornáček<a class="hl" name="400" href="#400">400</a><span class='fold-space'> </span> { 407eeb7e5b3SAdam Hornáček<a class="l" name="401" href="#401">401</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">"Keylength '</span>$($<b>param</b>.<a href="/source/s?defs=KeyLength" class="intelliWindow-symbol" data-definition-place="undefined-in-file">KeyLength</a>)<span class="s">' is not valid for CryptoProviderName '</span>$($<b>param</b>.<a href="/source/s?defs=CryptoProviderName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CryptoProviderName</a>)<span class="s">'. The Crypto Provider selected supports the following keylengths:`n </span>$($<a class="d intelliWindow-symbol" href="#combination" data-definition-place="defined-in-file">combination</a>.<a href="/source/s?defs=KeyLength" class="intelliWindow-symbol" data-definition-place="undefined-in-file">KeyLength</a> <b>-join</b> <span class="s">"`n "</span>)<span class="s">"</span>; <b>return</b> 408eeb7e5b3SAdam Hornáček<a class="l" name="402" href="#402">402</a><span class='fold-space'> </span> } 409eeb7e5b3SAdam Hornáček<a class="l" name="403" href="#403">403</a><span class='fold-space'> </span> 410eeb7e5b3SAdam Hornáček<a class="l" name="404" href="#404">404</a><span class='fold-space'> </span> 411eeb7e5b3SAdam Hornáček<a class="l" name="405" href="#405">405</a><span class='fold-space'> </span> 412eeb7e5b3SAdam Hornáček<a class="l" name="406" href="#406">406</a><span class='fold-space'> </span> <b>if</b> ($<a class="d intelliWindow-symbol" href="#role" data-definition-place="defined-in-file">role</a>.<a href="/source/s?defs=Properties" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Properties</a>.<a href="/source/s?defs=ContainsKey" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ContainsKey</a>(<span class="s">'DatabaseDirectory'</span>) <b>-and</b> <b>-not</b> ($<b>param</b>.<a href="/source/s?defs=DatabaseDirectory" class="intelliWindow-symbol" data-definition-place="undefined-in-file">DatabaseDirectory</a> <b>-match</b> <span class="s">'^[C-Z]:\\'</span>)) 413eeb7e5b3SAdam Hornáček<a class="l" name="407" href="#407">407</a><span class='fold-space'> </span> { 414eeb7e5b3SAdam Hornáček<a class="l" name="408" href="#408">408</a><span class='fold-space'> </span> <b>Write-Error</b> -<a href="/source/s?defs=Message" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Message</a> <span class="s">'DatabaseDirectory needs to be located on a local drive (drive letter C-Z)'</span>; <b>return</b> 415eeb7e5b3SAdam Hornáček<a class="l" name="409" href="#409">409</a><span class='fold-space'> </span> } 416eeb7e5b3SAdam Hornáček<a class="hl" name="410" href="#410">410</a><span class='fold-space'> </span> 417eeb7e5b3SAdam Hornáček<a class="l" name="411" href="#411">411</a><span class='fold-space'> </span> <span class="c">#...</span> 418eeb7e5b3SAdam Hornáček<a class="l" name="412" href="#412">412</a><span class='fold-space'> </span> 419eeb7e5b3SAdam Hornáček<a class="l" name="413" href="#413">413</a><span class='fold-space'> </span> <span class="c">#if any validity parameter was defined, get these now and convert them all to hours (temporary variables)</span> 420eeb7e5b3SAdam Hornáček<a class="l" name="414" href="#414">414</a><span class='fold-space'> </span> <b>if</b> ($<b>param</b>.<a href="/source/s?defs=ValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriodUnits</a> <b>-ne</b> <span class="s">'<auto>'</span>) 421eeb7e5b3SAdam Hornáček<a class="l" name="415" href="#415">415</a><span class='fold-space'> </span> { 422eeb7e5b3SAdam Hornáček<a class="l" name="416" href="#416">416</a><span class='fold-space'> </span> <b>switch</b> ($<b>param</b>.<a href="/source/s?defs=ValidityPeriod" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriod</a>) 423eeb7e5b3SAdam Hornáček<a class="l" name="417" href="#417">417</a><span class='fold-space'> </span> { 424eeb7e5b3SAdam Hornáček<a class="l" name="418" href="#418">418</a><span class='fold-space'> </span> <span class="s">'Years'</span> { $<a class="xv" name="validityPeriodUnitsHours"/><a href="/source/s?refs=validityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">validityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=ValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriodUnits</a> * <span class="n">365</span> * <span class="n">24</span> } 425eeb7e5b3SAdam Hornáček<a class="l" name="419" href="#419">419</a><span class='fold-space'> </span> <span class="s">'Months'</span> { $<a class="xv" name="validityPeriodUnitsHours"/><a href="/source/s?refs=validityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">validityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=ValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriodUnits</a> * (<a href="/source/s?path=365/">365</a>/<a href="/source/s?path=365/12">12</a>) * <span class="n">24</span> } 426eeb7e5b3SAdam Hornáček<a class="hl" name="420" href="#420">420</a><span class='fold-space'> </span> <span class="s">'Weeks'</span> { $<a class="xv" name="validityPeriodUnitsHours"/><a href="/source/s?refs=validityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">validityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=ValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriodUnits</a> * <span class="n">7</span> * <span class="n">24</span> } 427eeb7e5b3SAdam Hornáček<a class="l" name="421" href="#421">421</a><span class='fold-space'> </span> <span class="s">'Days'</span> { $<a class="xv" name="validityPeriodUnitsHours"/><a href="/source/s?refs=validityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">validityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=ValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriodUnits</a> * <span class="n">24</span> } 428eeb7e5b3SAdam Hornáček<a class="l" name="422" href="#422">422</a><span class='fold-space'> </span> <span class="s">'Hours'</span> { $<a class="xv" name="validityPeriodUnitsHours"/><a href="/source/s?refs=validityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">validityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=ValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ValidityPeriodUnits</a> } 429eeb7e5b3SAdam Hornáček<a class="l" name="423" href="#423">423</a><span class='fold-space'> </span> } 430eeb7e5b3SAdam Hornáček<a class="l" name="424" href="#424">424</a><span class='fold-space'> </span> } 431eeb7e5b3SAdam Hornáček<a class="l" name="425" href="#425">425</a><span class='fold-space'> </span> <b>if</b> ($<b>param</b>.<a href="/source/s?defs=CertsValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriodUnits</a> <b>-ne</b> <span class="s">'<auto>'</span>) 432eeb7e5b3SAdam Hornáček<a class="l" name="426" href="#426">426</a><span class='fold-space'> </span> { 433eeb7e5b3SAdam Hornáček<a class="l" name="427" href="#427">427</a><span class='fold-space'> </span> <b>switch</b> ($<b>param</b>.<a href="/source/s?defs=CertsValidityPeriod" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriod</a>) 434eeb7e5b3SAdam Hornáček<a class="l" name="428" href="#428">428</a><span class='fold-space'> </span> { 435eeb7e5b3SAdam Hornáček<a class="l" name="429" href="#429">429</a><span class='fold-space'> </span> <span class="s">'Years'</span> { $<a class="xv" name="certsvalidityPeriodUnitsHours"/><a href="/source/s?refs=certsvalidityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">certsvalidityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CertsValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriodUnits</a> * <span class="n">365</span> * <span class="n">24</span> } 436eeb7e5b3SAdam Hornáček<a class="hl" name="430" href="#430">430</a><span class='fold-space'> </span> <span class="s">'Months'</span> { $<a class="xv" name="certsvalidityPeriodUnitsHours"/><a href="/source/s?refs=certsvalidityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">certsvalidityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CertsValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriodUnits</a> * (<a href="/source/s?path=365/">365</a>/<a href="/source/s?path=365/12">12</a>) * <span class="n">24</span> } 437eeb7e5b3SAdam Hornáček<a class="l" name="431" href="#431">431</a><span class='fold-space'> </span> <span class="s">'Weeks'</span> { $<a class="xv" name="certsvalidityPeriodUnitsHours"/><a href="/source/s?refs=certsvalidityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">certsvalidityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CertsValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriodUnits</a> * <span class="n">7</span> * <span class="n">24</span> } 438eeb7e5b3SAdam Hornáček<a class="l" name="432" href="#432">432</a><span class='fold-space'> </span> <span class="s">'Days'</span> { $<a class="xv" name="certsvalidityPeriodUnitsHours"/><a href="/source/s?refs=certsvalidityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">certsvalidityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CertsValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriodUnits</a> * <span class="n">24</span> } 439eeb7e5b3SAdam Hornáček<a class="l" name="433" href="#433">433</a><span class='fold-space'> </span> <span class="s">'Hours'</span> { $<a class="xv" name="certsvalidityPeriodUnitsHours"/><a href="/source/s?refs=certsvalidityPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">certsvalidityPeriodUnitsHours</a> = [<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CertsValidityPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CertsValidityPeriodUnits</a> } 440eeb7e5b3SAdam Hornáček<a class="l" name="434" href="#434">434</a><span class='fold-space'> </span> } 441eeb7e5b3SAdam Hornáček<a class="l" name="435" href="#435">435</a><span class='fold-space'> </span> } 442eeb7e5b3SAdam Hornáček<a class="l" name="436" href="#436">436</a><span class='fold-space'> </span> <b>if</b> ($<b>param</b>.<a href="/source/s?defs=CRLPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriodUnits</a> <b>-ne</b> <span class="s">'<auto>'</span>) 443eeb7e5b3SAdam Hornáček<a class="l" name="437" href="#437">437</a><span class='fold-space'> </span> { 444eeb7e5b3SAdam Hornáček<a class="l" name="438" href="#438">438</a><span class='fold-space'> </span> <b>switch</b> ($<b>param</b>.<a href="/source/s?defs=CRLPeriod" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriod</a>) 445eeb7e5b3SAdam Hornáček<a class="l" name="439" href="#439">439</a><span class='fold-space'> </span> { 446eeb7e5b3SAdam Hornáček<a class="hl" name="440" href="#440">440</a><span class='fold-space'> </span> <span class="s">'Years'</span> { $<a class="xv" name="cRLPeriodUnitsHours"/><a href="/source/s?refs=cRLPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriodUnits</a> * <span class="n">365</span> * <span class="n">24</span>) } 447eeb7e5b3SAdam Hornáček<a class="l" name="441" href="#441">441</a><span class='fold-space'> </span> <span class="s">'Months'</span> { $<a class="xv" name="cRLPeriodUnitsHours"/><a href="/source/s?refs=cRLPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLPeriodUnit" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriodUnit</a> * (<a href="/source/s?path=365/">365</a>/<a href="/source/s?path=365/12">12</a>) * <span class="n">24</span>) } 448eeb7e5b3SAdam Hornáček<a class="l" name="442" href="#442">442</a><span class='fold-space'> </span> <span class="s">'Weeks'</span> { $<a class="xv" name="cRLPeriodUnitsHours"/><a href="/source/s?refs=cRLPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriodUnits</a> * <span class="n">7</span> * <span class="n">24</span>) } 449eeb7e5b3SAdam Hornáček<a class="l" name="443" href="#443">443</a><span class='fold-space'> </span> <span class="s">'Days'</span> { $<a class="xv" name="cRLPeriodUnitsHours"/><a href="/source/s?refs=cRLPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriodUnits</a> * <span class="n">24</span>) } 450eeb7e5b3SAdam Hornáček<a class="l" name="444" href="#444">444</a><span class='fold-space'> </span> <span class="s">'Hours'</span> { $<a class="xv" name="cRLPeriodUnitsHours"/><a href="/source/s?refs=cRLPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLPeriodUnits</a>) } 451eeb7e5b3SAdam Hornáček<a class="l" name="445" href="#445">445</a><span class='fold-space'> </span> } 452eeb7e5b3SAdam Hornáček<a class="l" name="446" href="#446">446</a><span class='fold-space'> </span> } 453eeb7e5b3SAdam Hornáček<a class="l" name="447" href="#447">447</a><span class='fold-space'> </span> <b>if</b> ($<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriodUnits</a> <b>-ne</b> <span class="s">'<auto>'</span>) 454eeb7e5b3SAdam Hornáček<a class="l" name="448" href="#448">448</a><span class='fold-space'> </span> { 455eeb7e5b3SAdam Hornáček<a class="l" name="449" href="#449">449</a><span class='fold-space'> </span> <b>switch</b> ($<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriod" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriod</a>) 456eeb7e5b3SAdam Hornáček<a class="hl" name="450" href="#450">450</a><span class='fold-space'> </span> { 457eeb7e5b3SAdam Hornáček<a class="l" name="451" href="#451">451</a><span class='fold-space'> </span> <span class="s">'Years'</span> { $<a class="xv" name="cRLDeltaPeriodUnitsHours"/><a href="/source/s?refs=cRLDeltaPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLDeltaPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriodUnits</a> * <span class="n">365</span> * <span class="n">24</span>) } 458eeb7e5b3SAdam Hornáček<a class="l" name="452" href="#452">452</a><span class='fold-space'> </span> <span class="s">'Months'</span> { $<a class="xv" name="cRLDeltaPeriodUnitsHours"/><a href="/source/s?refs=cRLDeltaPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLDeltaPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriodUnits</a> * (<a href="/source/s?path=365/">365</a>/<a href="/source/s?path=365/12">12</a>) * <span class="n">24</span>) } 459eeb7e5b3SAdam Hornáček<a class="l" name="453" href="#453">453</a><span class='fold-space'> </span> <span class="s">'Weeks'</span> { $<a class="xv" name="cRLDeltaPeriodUnitsHours"/><a href="/source/s?refs=cRLDeltaPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLDeltaPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriodUnits</a> * <span class="n">7</span> * <span class="n">24</span>) } 460eeb7e5b3SAdam Hornáček<a class="l" name="454" href="#454">454</a><span class='fold-space'> </span> <span class="s">'Days'</span> { $<a class="xv" name="cRLDeltaPeriodUnitsHours"/><a href="/source/s?refs=cRLDeltaPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLDeltaPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriodUnits</a> * <span class="n">24</span>) } 461eeb7e5b3SAdam Hornáček<a class="l" name="455" href="#455">455</a><span class='fold-space'> </span> <span class="s">'Hours'</span> { $<a class="xv" name="cRLDeltaPeriodUnitsHours"/><a href="/source/s?refs=cRLDeltaPeriodUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">cRLDeltaPeriodUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLDeltaPeriodUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLDeltaPeriodUnits</a>) } 462eeb7e5b3SAdam Hornáček<a class="l" name="456" href="#456">456</a><span class='fold-space'> </span> } 463eeb7e5b3SAdam Hornáček<a class="l" name="457" href="#457">457</a><span class='fold-space'> </span> } 464eeb7e5b3SAdam Hornáček<a class="l" name="458" href="#458">458</a><span class='fold-space'> </span> <b>if</b> ($<b>param</b>.<a href="/source/s?defs=CRLOverlapUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapUnits</a> <b>-ne</b> <span class="s">'<auto>'</span>) 465eeb7e5b3SAdam Hornáček<a class="l" name="459" href="#459">459</a><span class='fold-space'> </span> { 466eeb7e5b3SAdam Hornáček<a class="hl" name="460" href="#460">460</a><span class='fold-space'> </span> <b>switch</b> ($<b>param</b>.<a href="/source/s?defs=CRLOverlapPeriod" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapPeriod</a>) 467eeb7e5b3SAdam Hornáček<a class="l" name="461" href="#461">461</a><span class='fold-space'> </span> { 468eeb7e5b3SAdam Hornáček<a class="l" name="462" href="#462">462</a><span class='fold-space'> </span> <span class="s">'Years'</span> { $<a class="xv" name="CRLOverlapUnitsHours"/><a href="/source/s?refs=CRLOverlapUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">CRLOverlapUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLOverlapUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapUnits</a> * <span class="n">365</span> * <span class="n">24</span>) } 469eeb7e5b3SAdam Hornáček<a class="l" name="463" href="#463">463</a><span class='fold-space'> </span> <span class="s">'Months'</span> { $<a class="xv" name="CRLOverlapUnitsHours"/><a href="/source/s?refs=CRLOverlapUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">CRLOverlapUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLOverlapUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapUnits</a> * (<a href="/source/s?path=365/">365</a>/<a href="/source/s?path=365/12">12</a>) * <span class="n">24</span>) } 470eeb7e5b3SAdam Hornáček<a class="l" name="464" href="#464">464</a><span class='fold-space'> </span> <span class="s">'Weeks'</span> { $<a class="xv" name="CRLOverlapUnitsHours"/><a href="/source/s?refs=CRLOverlapUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">CRLOverlapUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLOverlapUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapUnits</a> * <span class="n">7</span> * <span class="n">24</span>) } 471eeb7e5b3SAdam Hornáček<a class="l" name="465" href="#465">465</a><span class='fold-space'> </span> <span class="s">'Days'</span> { $<a class="xv" name="CRLOverlapUnitsHours"/><a href="/source/s?refs=CRLOverlapUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">CRLOverlapUnitsHours</a> = [<b>int</b>]([<b>int</b>]$<b>param</b>.<a href="/source/s?defs=CRLOverlapUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapUnits</a> * <span class="n">24</span>) } 472eeb7e5b3SAdam Hornáček<a class="l" name="466" href="#466">466</a><span class='fold-space'> </span> <span class="s">'Hours'</span> { $<a class="xv" name="CRLOverlapUnitsHours"/><a href="/source/s?refs=CRLOverlapUnitsHours" class="xv intelliWindow-symbol" data-definition-place="def">CRLOverlapUnitsHours</a> = [<b>int</b>]([<b>int</b>]${<b>param</b>}.<a href="/source/s?defs=CRLOverlapUnits" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CRLOverlapUnits</a>) } 473eeb7e5b3SAdam Hornáček<a class="l" name="467" href="#467">467</a><span class='fold-space'> </span> } 474eeb7e5b3SAdam Hornáček<a class="l" name="468" href="#468">468</a><span class='fold-space'> </span> } 475eeb7e5b3SAdam Hornáček<a class="l" name="469" href="#469">469</a><span class='fold-space'> </span> <span class="c">#...</span> 476eeb7e5b3SAdam Hornáček<a class="hl" name="470" href="#470">470</a><span class='fold-space'> </span>} 477eeb7e5b3SAdam Hornáček</span><a class="l" name="471" href="#471">471</a><span class='fold-space'> </span><span class="c">#endregion Install-LabCAMachine</span> 478eeb7e5b3SAdam Hornáček<a class="l" name="472" href="#472">472</a><span class='fold-space'> </span><span class="c">#...</span> 479eeb7e5b3SAdam Hornáček<a class="l" name="473" href="#473">473</a><span class='fold-space'> </span><span class="c"><#<a href="http://example.com">http://example.com</a>.#></span> 480eeb7e5b3SAdam Hornáček<a class="l" name="474" href="#474">474</a><span class='fold-space'> </span><b>Write-Debug</b> `$`{`} 481eeb7e5b3SAdam Hornáček<a class="l" name="475" href="#475">475</a><span class='fold-space'> </span><b>Write-Debug</b> $<b>false</b>.$<b>true</b>.$<b>param</b> 482eeb7e5b3SAdam Hornáček<a class="l" name="476" href="#476">476</a><span class='fold-space'> </span>$(<b>Write-Debug</b> $<b>true</b>) 483eeb7e5b3SAdam Hornáček<a class="l" name="477" href="#477">477</a><span class='fold-space'> </span> 484eeb7e5b3SAdam Hornáček<a class="l" name="478" href="#478">478</a><span class='fold-space'> </span><a class="xlbl" name="OuterLoop">:OuterLoop</a> <b>while</b> ($<b>true</b>) { 485eeb7e5b3SAdam Hornáček<a class="l" name="479" href="#479">479</a><span class='fold-space'> </span> <b>while</b> ($<b>true</b>) { <b>break</b> <a class="d intelliWindow-symbol" href="#OuterLoop" data-definition-place="defined-in-file">OuterLoop</a> } 486eeb7e5b3SAdam Hornáček<a class="hl" name="480" href="#480">480</a><span class='fold-space'> </span>} 487eeb7e5b3SAdam Hornáček<a class="l" name="481" href="#481">481</a><span class='fold-space'> </span></body> 488eeb7e5b3SAdam Hornáček</html> 489