2023-02-20

指定 PowerShell AD Command 作用的 Domain Controller

 $PSDefaultParameterValues=@{
   "*-ADGroupMember:Server"="DC01.Contoso.com"
}

Add-ADGroupMember -Identity "GroupName" -Members "Dino9021"

Reference:

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parameters_default_values?view=powershell-5.1



沒有留言:

張貼留言