Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Open
  • Priority: Low
  • Security: Public
  • Views: 19
  • Last Modified:

Set Registry on Multiple Servers in Multiple Forests

Hello there,
Would like to ask for some assistance. I have the following registry updates and would like to do an update to servers' registries in multiple forests. Can someone please shed some light?

invoke-command -Computer (Get-Content "C:\temp\listofservers.txt")
-ScriptBlock {
Set-ItemProperty HKLM:SYSTEM\CurrentControlSet\services\DNS\Parameters -Name EnableGlobalQueryBlockList-Value 0 -Propertytype DWORD -Force
Set-ItemProperty HKLM:SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters -Name SMB1 -Value 0 -PropertyType DWORD -Force
}

Thank you so much for your help!
0
IT_Admin XXXX
Asked:
IT_Admin XXXX
1 Comment
 
footechCommented:
Break your listofservers.txt file into multiple so that each contains only servers of a particular forest.
Then submit the list to Invoke-Command using the -Credential parameter, supplying the necessary credentials for each forest.
1

Join & Write a Comment

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now