Stop multiple services starting with same name

Stop multiple services starting with same name. Well I was in need to reboot a Windows 2008 server and before reboot all the application services were supposed to be stopped. I had to manually stop all services one by one. After couple of days I was requested to perform the same activity once again. This time I thought to look for an option to stop all services using single command. I found that all the application services names started in same format. Hence, below listed powershell command made my task very easy.

Get-Service | Where-Object {$_.displayName.StartsWith(“ABCD”)} | stop-Service

Note: Replace ABCD with your requirement.

Thanks,

WintelAdmin

Generate list of hotfixes and patches installed.

Was in need to get the list of hotfix and patches installed on windows server including installation date, user, etc. Finally, got to know about the command that can fetch the required details and in a very neat format.

wmic qfe list full /format:htable > hotfixes.html

Thanks,
WintelAdmin

IIS World wide web publishing service stopping


Got an alert stating IIS 7 role unavailable, when checked found that the service named World Wide Web publishing service was not starting. This could be in case the IIS isn’t shutdown cleanly. This could break the services like World Wide Web publishing service (w3svc).
In that case, we can fix the issue by resetting the IIS by executing the commands
# iisreset /stop
# iisreset /start
or
taskkill /F /FI “SERVICES eq w3svc”
Finally, restarting the IIS would fix the issue.

Thanks,
Winteladmin

SQL Server 2008 R2: A failure was detected for a previous installation

SQL Server 2008 R2 cumulative update was giving an error stating SQL Server setup failure.

SQL Server Setup has encountered the following error:

A failure was detected for a previous installation, patch or repair for instance “MSSQLSERVER” during the configurtion for features………. Error code 0x84B20001

Found it on Microsoft forums and other posts to look for these registry entries:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\ConfigurationState

MPT_AGENT_CORE_CNI
SQL_Engine_Core_Inst
SQL_Replication_Core_Inst

All REG_DWORD values were set to 3 and changed them to 1.

Wow, this time the setup validation succeeded and the SQL server 2008 R2 update operation was completed successfully.

MMC not starting

MMC is not starting and it shows an error message stating that it will not run with a version of a Internet Explorer earlier than Internet Explorer 5.5.

To work around this issue, create a string entry (REG_SZ) with the name Version and the value “6.0.0.0” under the subkey

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer

Thanks,

WintelAdmin

Please wait for the Windows Modules Installer.

One of my windows 2008 didn’t come after reboot. Upon checking the console, saw a message stating “Please wait for the Windows Modules Installer.”. Had to bring up the server at the earliest. It took about an hour, tried reset but server was getting back on to same page. Application team was eagerly waiting for it to come back. Started looking for alternative methods to bring it up.

When checking server was pinging and able to shared folders. Hence, connected to the server from services.msc using the option “Connect to another computer..”

Disabled “Windows Module Installer” service and restarted the server.

Bang, server was back on its home page.

Thanks,

WintelAdmin

Send-MailMessage : Unable to connect to remote server Line

Send-MailMessage -to “reciever@domin.com” -from “sender@domain.com” -Subject “Subject Info” -Body “Content” -SmtpServer “Server Name”

Was not able to send mail from a Windows 2008 server and the error message displayed is as listed below:

Send-MailMessage : Unable to connect to the remote server
At line:1 char:17
+ Send-MailMessage <<<< -to someone@somedomain.com -from “DhimantR@someDomain.com” -subject ” Troubleshooting” -Body “Some Text or file attachement” -sntpserver “smtpserver”
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.Send MailMessage

Found that the the block was in McAfee, when Powershell was excluded from McAfee. Send mail was success.

Steps to exclude Powershell in McAfee is listed below:

  1. Right click on McAfee icon.
  2. Click on Virus Scan Console.
  3. Double click on Access Protection on VirusScan Console.
  4. On Access Protection tab.
  5. Go to Anti-Virus Standard Protection.
  6. On right hand side, double click on Prevent mass mailing worms from sending mail.
  7. On process to exclude tab, add PowerShell.exe at the end.
  8. Click OK.
  9. Click apply on Access Protection.
  10. Click OK.

Thanks,
WintelAdmin

Remove unused programs from control panel using registry.

Wanted to install latest version of Java. When tried to install Java, got failed because of the existence of previous version of Java. There was no uninstaller available to uninstall the previous version of Java. To make successful installation of Java there was a need to remove previous version of Java from program list.

Below listed steps were followed to clear Java from control panel.

  1. Open registry.
  2. Locate HKLM\software\classes\installer\products
  3. Search for the program name (eg; Java)
  4. Look for the folder that contains the program and delete it.

Once you refresh and try reinstalling it should be success.

Thanks,

Winteladmin

 

How to move Quorum disk in a failover cluster.

In a Windows Cluster, you can move roles from one node to another. Unfortunately, you may not find an option to move quorum disk to another node.

However, there is an option to move quorum disk to another node using the command line tool.

You can view the cluster status using the command:

Cluster Group

Note: This will list the status for all available resource group.

In order to move the quorum disk, you need to move the “cluster group” group to the desination node using the below command:

Cluster group “Cluster group” /moveto:NodeName

Note: Replace the NodeName with the destination node name. This is to be executed from the node that is holding the quorum disk.

Thanks,
WintelAdmin

Cannot open programs unless “Run As Administrator

One of the application was recently installed on Windows 2012 Server, when I click on the short cut its gives an error message stating ” … has stopped working. Windows can check online for a solution to the problem”.  Further, it gives options to check online for a solution and close the program or close the program.

To my surprise, it was found that the application opens by clicking on “Run as Administrator”. Later, clicking “Run as admin” every time was annoying. Hence, the application was set to run as administrator by default following the steps listed below:

Right click the program and select Properties

Under the compatibility tab, select Run this program as an administrator

Click Apply and OK

Thanks,
WintelAdmin