Skip to content

Commit

Permalink
Update ReIndex script with parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
DeploymentBunny committed Feb 7, 2017
1 parent 465afd4 commit 7d4d400
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
.LINK
http://www.deploymentbunny.com
#>
Param(
$ComputerNames
)
Function Get-RemoteComputerSystemInfo{
param(
$ComputerName
Expand Down Expand Up @@ -43,7 +46,7 @@ Function Get-RemoteComputerSystemInfo{
#Get the servers
Write-Host "Getting Server names"
Import-Module "ActiveDirectory"
$Computers = Get-ADComputer -LDAPFilter "(&(objectCategory=computer)(name=SRV*)(operatingSystem=Windows Server*)(!serviceprincipalname=*MSClusterVirtualServer*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))"
$Computers = Get-ADComputer -LDAPFilter "(&(objectCategory=computer)(name=$ComputerNames)(!serviceprincipalname=*MSClusterVirtualServer*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))"

Write-Host "Found $($Computers.Count)"
Write-Host "Check if they are online"
Expand Down

0 comments on commit 7d4d400

Please sign in to comment.