Posts

How to monitor TFS version upgrades through backend Data Tier Servers

At times, TFS upgrades may take longer time than expected and you might have to handover the activity to somebody else in your team. But the challenge is that, your colleague may not be able to monitor the upgrade via TFS Admin Console GUI so, the turnaround is to connect the backend data tier server --> connect to tfs_configuration database and run below sql query to get detailed information on the status of TFS upgrade. Use TFS_configuration  Go  Select SJD.HostID, SH.Name, SJD.JobStatus, SJD.StartTime, SJD.EndTime, SJD.CompletedStepCount, SJD.TotalStepCount FROM tbl_ServicingJobDetail SJD Join tbl_ServiceHost SH on SH.HostID = SJD.HostID Order By StartTime desc Select top 10 * from dbo.tbl_ServicingStepDetail  Order By DetailTime desc

Install Telnet using Windows Command Prompt and PowerShell

Install Telnet using PowerShell Install-WindowsFeature -name Telnet-Client Install Telnet using Command Prompt dism /online /Enable-Feature /FeatureName:TelnetClient Note : in either scenario, open the cmd or PowerShell as Administrator 

How to identify and resolve the Azure VMs OS Blue Screen Issues after Windows Updates Failures

Issue : While trying to connect VM and seeing blue screen. This is happing after windows updates failures. Overview :  Blue screens are generally caused by problems with our computer’s hardware or drivers related. Sometimes, they can be caused by issues with Windows kernel or other registry entries mismatches.  When a blue screen occurs, Windows automatically creates a “minidump” such as memory dump file that contains information about the crash and saves it to our disk. We can view information about these minidumps to help identify the cause of the blue screen. Root Cause Analysis: After going through memory dump file in detailed, I came to know that few registry entries got replaced by recent windows updates failures, hence OS is not able to load with existing system boot entries and it’s causes the OS failures. How to fix the issues and start the  VM successfully: Since this is the VM and we can’t login with safe mode /network mode to trouble shoot the issues. We have to perform the

Install IIS on server using PowerShell

Script for Individual Install of IIS (Windows 2012) The following script can be used for installation on the local server: Open a Powershell window as Admin and run the following: Install-WindowsFeature Web-Server,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Static-Content,Web-Http-Redirect,Web-Health,Web-Http-Logging,Web-Request-Monitor,Web-Performance,Web-Stat-Compression,Web-Security,Web-Filtering,Web-CertProvider,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-ASP,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Lgcy-Scripting,Web-Lgcy-Mgmt-Console,Web-Metabase,Web-WMI,Web-Scripting-Tools Script for Individual Install on a remote server of IIS (Windows 2012) The following script can be used for installation on the remote server (the –ComputerName switch at the end) Install-WindowsFeature Web-Server,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web

Find Page File Location of Local Machine

PS C:\Users\sam> Get-WmiObject Win32_PageFileSetting  -ComputerName 'samcomputer' MaximumSize Name             Caption ----------- ----             -------        4096 d:\pagefile.sys d:\ 'pagefile.sys ' PS C:\Users\sam>

Set SQL Max Memory using SQL Query

This doesn't require restart since SQL 2014 EXEC sp_configure'max server memory (MB)',209714; GO RECONFIGURE; GO Configuration option 'max server memory (MB)' changed from 25600 to 209714. Run the RECONFIGURE statement to install.

CHECK DISK SPACE REMOTELY

Execute below script in PowerShell window with elevated permissions to check for the disk space of a single server $ServerName = 'SEVERNAME' -- ##Replace the server name here Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" -ComputerName $ServerName | Select-Object -Property @{n='DriveLetter';e={$PSItem.DeviceID}}, @{n='FreeSpace(GB)';e={"{0:N1}" -f ($PSItem.FreeSpace / 1GB)}}, @{n='TotalSize(GB)';e={"{0:N1}" -f ($PSItem.Size / 1GB)}}, @{n='FreeSpace%';e={"{0:N1}%" -f ($PSItem.FreeSpace / $PSItem.Size * 100)}} | ft -AutoSize  Execute below script in PowerShell window with elevated permissions to check for the disk space of a single server for multiple servers $file = get-Content C:\Users\sam\Documents\computers.txt foreach ( $args in $file) {  Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" -ComputerName $file | Select-Object -Property @{n = &