Posts

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 = ...

WINDOWS SERVER 2003 BOOTING PROCESS

BIOS : PERFORMS POWER ON SELF TEST (POST) BIOS : LOADS MBR FROM THE BOOT DEVICE SPECIFIED/SELECTED BY THE BIOS MBR : CONTAINS A SMALL AMOUNT OF CODE THAT READS THE PARTITION TABLE, THE FIRST PARTITION MARKED AS ACTIVE IS DETERMINED TO BE THE SYSTEM VOLUME MBR : LOADS THE BOOT SECTOR FROM THE SYSTEM VOLUME BOOT SECTOR : READS THE ROOT DIRECTORY OF THE SYSTEM VOLUME AT LOADS NTLDR NTLDR : READS BOOT.INI FROM THE SYSTEM VOLUME TO DETERMINE THE BOOT DRIVE (PRESENTING A MENU IF MORE THAN 1 ENTRY IS DEFINED) NTLDR : LOADS AND EXECUTES NTDETECT.COM FROM THE SYSTEM VOLUME TO PERFORM BIOS HARDWARE DETECTION NTLDR : LOADS NTOSKRNL.EXE, HAL.DLL, BOOTVID.DLL (AND KDCOM.DLL FOR XP UPWARDS) FROM THE BOOT (WINDOWS) VOLUME NTLDR : LOADS \WINDOWS\SYSTEM32\CONFIG\SYSTEM WHICH BECOMES THE SYSTEM HIVE HKEY_LOCAL_MACHINE\SYSTEM NTLDR : LOADS DRIVERS FLAGGED AS “BOOT” DEFINED IN THE SYSTEM HIVE, THEN PASSES CONTROL TO NTOSKRNL.EXE NTOSKRNL.EX E: BRINGS UP THE LOADING SPLASH SCREEN AND INITIALIZES THE KERN...

APPLYING SITE LEVEL POLICY

Image
If we apply the policy on Site level on (Microsoft.com) forest, it is going to effect on the users of the forest. Let’s see how this is done. Note: No GPO can be created but it can only be linked. Right Click GP Objects, create new Policy. Now that the GPO is created for ‘Removing Run Dialog from Start Menu’ let us try linking it to the Sites. Login as a Domain user (E.g. U1) and hit Ctrl + R you will be thrown with below error.

ACTIVE DIRECTORY TRUST

Image
Secure communication paths that allow objects in one domain to be authenticated and accepted in other domain. Some trusts are automatically created. Parent and child domains trusts each other. Tree root domain trusts forest root domain. Other trusts are manually created. Forest – to – Forest transitive trust relationships can be created in Windows Server 2003, 2008 and Windows 2012 Forests only. TRUST RELATIONSHIPS Trust Category: Transitive and, Non – Transitive Trust Domain A trusting on Domain B and, Domain B trusting on Domain C and, if Domain A automatically trusts Domain C then, it is called Transitive Trust. Domain A trusting on Domain B and, Domain B trusting on Domain C and, if Domain A does not automatically trusts Domain C then, it is called Non - Transitive Trust. Trust Directions: One way incoming  – MICROSOFT users can login in HDFC domain but, HDFC user cannot login into MICROSOFT domain. One way outgoing  – HDFC u...