Posts

Showing posts from January, 2014

PowerShell script to find Windows computers in domain

When you are preparing for SQL Server inventory with any tool you will either have option to read entire AD for Server having SQL Server installed or you will need to feed the tool with a file having list of all the servers which you want to scan. Following is the PowerShell script to list all the windows machines from you domain: $objDomain = New-Object System.DirectoryServices.DirectoryEntry $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = $objDomain $objSearcher.PageSize = 9000 # Mention here how many results you need $objSearcher.Filter = '(OperatingSystem=*Window*)' # Filter for computer having words "Windows" in their operating system # Following options also can be used # '(OperatingSystem=*Window*Server*)'  # Above filter is for computer having words "Windows" and "Server" in their operating system # '(OperatingSystem=*Window*Server*2008*)'  # Above filter is for comput

The current master key cannot be decrypted

We had the requirement to migrate our cluster to a different domain. We knew that Microsoft does not recommend to migrate the existing cluster to a different domain (Read http://support.microsoft.com/kb/269196 ). The business could not afford the time to build a new cluster in the target domain and move the databases to the SQL Server instance created on target cluster. We uninstalled the SQL server after backing up each database. Server team removed the nodes from the cluster and then moved each node to a new domain. We then installed the SQL Server and attached (since time was constraint) each databases back. All the databases were running fine and we could use them. We restored the master and msdb database so that all the logins, jobs and integration packages are back in place. Later while setting up distribution for replication we faced the first error: There is no remote user 'distributor_admin' mapped to local user '(null)' from the remote server 'repl_dist

Make Money from Surveys