added files and folders
This commit is contained in:
24
WindowsAdminCenterPermissions.ps1
Normal file
24
WindowsAdminCenterPermissions.ps1
Normal file
@@ -0,0 +1,24 @@
|
||||
# Add and import AD PowerShell
|
||||
Add-WindowsFeature RSAT-AD-PowerShell
|
||||
Import-Module ActiveDirectory
|
||||
|
||||
# Host name of Windows Admin Center
|
||||
$wac = "WinSrvr2019-02"
|
||||
|
||||
# Server names and Cluster names that you want to manage with Windows Admin Center in your domain
|
||||
$servers = "ADServer-01", "ADServer-02", "HyperVHost-01", "HyperVHost-02", "WinSrvr2019-01", "WinSrvr2019-02", "WinSrvr2019-03", "Win1020H2-01", "VeeamServer", "GamingPC", "LaptopPC", "MediaPC"
|
||||
|
||||
# Get the identity object of WAC
|
||||
$wacobject = Get-ADComputer -Identity $WAC
|
||||
|
||||
# Set the resource-based kerberos constrained delegation for each node
|
||||
foreach ($server in $servers)
|
||||
{
|
||||
$serverObject = Get-ADComputer -Identity $server
|
||||
Set-ADComputer -Identity $serverObject -PrincipalsAllowedToDelegateToAccount $wacobject
|
||||
}
|
||||
|
||||
# Clear KDC Cache
|
||||
Invoke-Command -ComputerName $Servers -ScriptBlock {
|
||||
klist purge -li 0x3e7
|
||||
}
|
||||
Reference in New Issue
Block a user