Remove-Windows Feature throwing error

I have a listing of servers in my environment that I’m trying to disable SMBv1 on. Mixture of both 2008R2 and 2012R2 boxes, trying to automate the process as much as I can. Here’s my code: Connect-VIServer -Server $server = Get-VM -Name Test-NewServer Enter-PSSession $server Remove-WindowsFeature -Name FS-SMB1 Exit-PSSession Restart-VMGuest $server When I run […]

Combine two active directory group collections?

So I have the following code. Each line creates a collection of the groups pulled from active directory, from two different OUs. I need to combine them into a single collection that I can work on. Any help would be greatly appreciated. $Groups2 = Get-ADGroup -Filter * -SearchBase “OU=RestrictedGroups,OU=Mycorp,DC=MYDOMAIN,DC=COM” -Server -SearchScope Subtree -Credential $MDCred […]