Pages

Thursday, November 21, 2013

Enabling Powershell ISE in new Win2k8 Machine

PowerShell ISE (Integrated Scripting Environment) gets installed by default Windows Server 2008 R2 But you will not be able to see it in your Programs --> Accessories ---> Windows Powershell


GUI Way :
You can install it through the server Manager - Click Add Feature - Select  “Windows PowerShell Integrated Scripting Environment (ISE)” - Install


Powershell Way :

  1. Open Powershell Window [ Run As Administrator]
  2. Import-Module Server Manager
  3. Add-WindowsFeature Powershell-ISE

Thursday, October 10, 2013

Check Disk


In built windows tool to check the integrity of the file system.

Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B]

  volume          Specifies the drive letter (followed by a colon),
                  mount point, or volume name.
  filename        FAT/FAT32 only: Specifies the files to check for fragmentation.
  /F              Fixes errors on the disk.
  /V              On FAT/FAT32: Displays the full path and name of every file
                  on the disk.
                  On NTFS: Displays cleanup messages if any.
  /R              Locates bad sectors and recovers readable information
                  (implies /F).
  /L:size         NTFS only:  Changes the log file size to the specified number
                  of kilobytes.  If size is not specified, displays current
                  size.
  /X              Forces the volume to dismount first if necessary.
                  All opened handles to the volume would then be invalid
                  (implies /F).
  /I              NTFS only: Performs a less vigorous check of index entries.
  /C              NTFS only: Skips checking of cycles within the folder
                  structure.
  /B              NTFS only: Re-evaluates bad clusters on the volume
                  (implies /R)

The /I or /C switch reduces the amount of time required to run Chkdsk by
skipping certain checks of the volume.



Example :

At a command prompt, you can test the integrity of the D drive by typing the following command:

chkdsk D:

To Repair/Fix

chkdsk /f D:

Note: Check Disk can’t repair volumes that are in use. If the volume is in use, Check Disk displays a prompt that asks if you want to schedule the volume to be checked the next time you restart the system. Click Yes to schedule this.



 

Tuesday, October 8, 2013

Windows Server 2012


Yesterday Have been to the Windows 2012 Training.



Windows Server 2012 has four editions:
Foundation
Essentials
Standard
Datacenter

Windows Server 2012 R2 has three editions of this operating system:
Essentials, Standard and Datacenter.


 Source Wiki :



Minimum system requirements for Windows Server 2012

Processor :1.4 GHz, x64
Memory :512 MB
Free disk space: 32 GB (more if there is 16 GB of RAM or more)


Installation options

Unlike its predecessor, Windows Server 2012 can switch between "Server Core" and "Server with a GUI" installation options without a full reinstallation. Server Core - an option with a command-line interface only - is now the recommended configuration.There is also a third installation option that allows some GUI elements such as MMC and Server Manager to run, but without the normal desktop, shell or default programs like File Explorer.

 

Hyper-V 3.0
Microsoft's Hyper-V Server – a free Windows Core version of Hyper-V – is feature complete.
If you have a yen to dive into PowerShell then you can run a complete 64-node, 8,000 virtual machine Hyper-V cluster without paying Microsoft a dime.




PowerShell
PowerShell 3.0 is an evolution rather than a revolution. Having more PowerShell scriptlets is not normally something I would care about. That said, the 2012 line of products marks a revolution in Microsoft's approach to server management.Windows PowerShell in this version has over 2300 commandlets, compared to around 200 in Windows Server 2008 R2.

IP address management (IPAM)

Windows Server 2012 has an IP address management role for discovering, monitoring, auditing, and managing the IP address space used on a corporate network. The IPAM is used for the management and monitoring of Domain Name System (DNS) and Dynamic Host Configuration Protocol (DHCP) servers. Both IPv4 and IPv6 are fully supported.IIS 8.0

Windows Server 2012 includes version 8.0 of Internet Information Services (IIS).

The new version contains new features such as SNI, CPU usage caps for particular websites,
centralized management of SSL certificates, WebSocket support and improved support for NUMA,
but few other substantial changes were made.

NFS 4.1
Microsoft's NFS 4.1 server is good code. Designed from the ground up it is is fast, stable and reliable.
It makes a great storage system for heterogenous environments and a wonderful network storage point for VMware servers.

More to come...Will be updating going forward.
Thanks for reading

 
 

Monday, October 7, 2013

Resetting HP ILO password.

Resetting the Password of ILO from Command Line.

There are two command line utilities from HP for managing ILO from Command Line.
HPoncfg and CPQlocfg.

Mulitple things can be achieved through them.

1.Dumping the ILO Configuration to a xml file.
2.Resetting the ILO Credentails
3.Resetting the ILO to factory Defaults
4.Resetting the Server  etc..

For Using HPconfg you need to be logging into the box for which the ILO has been configured.
CPQlocfg can be used remotely. The two have different advantages.

*Using hponcfg locally you do not need a valid username/password, but the syntax needs to be in the XML file your feeding to iLO

HPoncfg:

Usually you will find this exe under c:\HP....  [depends on you env]
Open the cmd promp. Browse to the location of HPoncfg. Run the below commands for what you want to achieve.

1.Dumping the ILO Configuration to a xml file.
hponcfg /w ilo.xml

2.Resetting  the ILO to factory Defaults
 hponcfg reset

3. Resetting the Server
hponcfg server reset

4. Resetting the ILO Password

usage : copy the below text and save it as an xml file. say adminreset.xml

<RIBCL VERSION=”2.0″>
<LOGIN USER_LOGIN=”user” PASSWORD=”password”>
<USER_INFO_MODE="Write">
<MOD_USER_USER_LOGIN="Administrator">
<PASSWORD value="NewPassword"/>
</MOD_USER>
</USER_INFO>
</LOGIN>
</RIBCL>

hponcfg /f adminreset.xml

You will find xml examples from the below.
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=18964&prodSeriesId=1146658&swItem=MTX-84d9a19b43b84516ac2d26d01f&prodNameId=1135772&swEnvOID=181&swLang=8&taskId=135&mode=4&idx=1

 

Tuesday, October 1, 2013

Learning Powershell

"Necessity is the Mother of All Inventions"

Powershell is becoming mandatory in current envrionment.
So to get started. There are ample of Free training or tutorials on the net which you can go through.

PowershellPro.com  [http://www.powershellpro.com/]
You will find Tutorials on the right side pane. Go through each and every tutorial one by one.

Microsoft Virtual Academy:
Videos/Training Material
http://www.microsoftvirtualacademy.com/training-courses/getting-started-with-powershell-3-0-jump-start#fbid=fSFs90wKyIq

Don Jones You tube Channel
http://www.youtube.com/channel/UCqPxcTs1F2k-NeZ-igDHvnQ

Windows PowerShell Scriptomatic:
Utility that writes WMI scripts for system administration.
http://www.microsoft.com/en-in/download/details.aspx?id=24121

Learn Powershell Before its an Emergency Series :
http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx

Pratice and Practice...You can even use the powershell forum if you find any issues with your scripts\cmdlets.

http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell

Will be adding up more going forward on this.


 

Wednesday, September 25, 2013

Resetting ILO's from Command Line

For resetting ILO's from Command Line.
It saves a lot of time when working remotely

You can use  telnet or plink utility to login to the ILO.

HP Servers
Telnet or Plink to the ILO ip with ID/Password.

telnet x.x.x.x  or Plink  userid@x.x.x.x -password xxxxx
 
it will take you to the prompt :
</>hpiLO-> cd /map1
status=0
status_tag=COMMAND COMPLETED

</map1>hpiLO-> reset
status=0
status_tag=COMMAND COMPLETED
Resetting iLO.

CLI session stopped.
 
You can even shutdown/restrat the server from here.
For more commands   type "help"

Dell Servers

cmd> Telnet xx.xx.xx.xx 23/22
Login with the remote console userID/Password.

>Racadm racreset

IBM Servers
cmd> Telnet xx.xx.xx.xx 23/22
Login with the remote console userID/Password.

>resetsp
 
 
Azam

Reparing WMI


When the WMI gets corrupted. You wont be able to install patches and the system will not work as expected.

Below is the recommendation from microsoft for rebuilding the reposittory

Actions to try
First try the following actions to see if they resolve your issue:

a. Re-register all of the dlls and recompile the .mofs in the wbem folder and re-registering WMI Service and Provider. You can use the following script by saving to txt file then renaming to .bat and running from command prompt with admin right and changing focus to following directory: C:\Windows\System32\Wbem.
@echo off
sc config winmgmt start= disabled
net stop winmgmt /y
%systemdrive%
cd %windir%\system32\wbem
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
wmiprvse /regserver
winmgmt /regserver
sc config winmgmt start= auto
net start winmgmt
for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
b. Reboot the machine and test WMI
Next, check the repository for consistencies:
For Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2, you can run winmgmt /verifyrepository from a command prompt.
For Older OS like
Windows XP and Windows Server 2003 run: WmiDiag tool with the checkconsistency option. For example: WmiDiag checkconsistency
If repository is found to be inconsistent:
a. For Vista and newer, run from elevated command prompt:
Winmgmt /salvagerepository
Note this command will take the content of the inconsistent repository and merge it into the rebuilt repository if it is readable
If the above doesn’t work, then run:
Winmgmt /resetrepository
Note this will reset repository to the initial state when the OS was first installed
For Windows XP and Windows Server 2003, there are no built in switches to rebuild the Repository, so you must do it manually.
Warning: Rebuilding the WMI repository has resulted in some 3rd party products not working until their setup is re-run & their MOF re-added back to the repository.
If /salvagerepository or /resetrepository does not resolve the issue, then manually rebuild repository

  1. Management Instrumentation (WMI) Service to disabled
  2. Stop the WMI Service; you may need to stop IP Helper Service first or other dependent services before it allows you to stop WMI Service
  3. Rename the repository folder: C:\WINDOWS\system32\wbem\Repository to Repository.old
  4. Open a CMD Prompt with elevated privileges
  5. CD windows\system32\wbem
  6. for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
  7. Set the WMI Service type back to Automatic and start WMI Service
  8. cd /d c:\ ((go to the root of the c drive, this is important))
  9. for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
  10. Reboot the server


Source : http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx