I found a Function like:
function New-ActiveDirectoryForest {
param(
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[pscredential]$Credential,
[Parameter(Mandatory)]
[string]$SafeModePassword,
[Parameter(Mandatory)]
[string]$ComputerName
)
Invoke-Command -ComputerName $ComputerName -Credential $Credential -ScriptBlock {
Install-windowsfeature -Name AD-Domain-Services
$forestParams = @{
DomainName = $using:Name
InstallDns = $true
Confirm = $false
SafeModeAdministratorPassword = (ConvertTo-SecureString -AsPlainText -String $using:SafeModePassword -Force)
WarningAction = 'Ignore'
}
$null = Install-ADDSForest @forestParams
}
}
What does $using:Name
or $using:SafeModePassword
stand for?
Thanks for your help.