Posts

iscsi connection commands for physical servers (NetApp SnapDrive)

The disk list command The  disk list  command displays a list of all the LUNs connected to the host. Syntax for this command is: sdcli disk list The preceding example lists all the SnapDrive LUNs mapped to drive letters on the local host. The disk list command also provides the following information for each LUN: LUN path ( storage system  name, share name, virtual disk file name, and might also include qtree name) Storage System Storage System Path ( storage system -side path, which includes volume name and LUN name) Hyper-V VHD present (a Hyper-V VHD exists) Hyper-V VM name Type Disk serial number Backed by Snapshot copy (if this is a LUN in a Snapshot copy, this displays the  storage system -side path to the Snapshot copy) Shared (whether the disk is dedicated or shared) CSV disk Boot or System Disk SCSI port Bus Target LUN Read only Disk size (in megabytes) SnapMirror source SnapVault primary Disk Partition Style (either MBR or GP...

Command to delete a folder in multiple remote computers

Below is the command i used to delete a folder in multiple remote computers: psexec @servers.txt cmd /c rd /s /q c:\folderpath\folder2del

How to generate HPS Report for Windows

Image
[ps] this is copy paste from:http://www.sysadminblog.info/tag/hps-report-for-windows/ - thanks to the admin out there :) HPS Reports is an information gathering tool for Windows servers.HPS Reports is similar to the Microsoft MPS Report, except it collects additional HP specific Hardware content. If you have a blue screen on a ProLiant Server running Windows and you have Windows support with HP, or you want HP to determine if the blue screen is hardware related. It’s possible that the systems specialist who takes your call may request an HPS Report. Download Link http://update.external.hp.com/HPS/HPSreports/ Note that there are currently four different variants of the tool. 1.HPSRPT_Enhanced_v9.1.00-x86.EXE – ProLiant –x86 – Running Windows NT/2000/2003/2008 32bit 2.HPSRPT_Enhanced_v9.1.00-ia64.EXE – Integrety – Running Windows 2003/2008 64 bit Itanium 3.HPSRPT_Enhanced_v9.1.00-x64.EXE – AMD64/Intel EM64T or Intel64 – Running Windows 2003/2008 64 bit And finally.. 4. HPSRPT_E...

Command to find specific patch is installed or not

I wanted to check if  KB KB2998527 is installed in few of my servers. Powershell on local computer: get-hotfix -id KB2998527 PowerShell command to look in remote server: get-hotfix -id KB2998527 -ComputerName myservername If you have a list of computer names, you can pass it to a command to check multiple machines. For example: get-content computers.txt | foreach \{ if (!(get-hotfix -id KB974332 -computername $_)) \{ add-content $_ -path Missing-KB974332.txt \}\} WMI: wmic qfe get hotfixid | find "KB2998527" wmic qfe | find "KB2998527" To get detailed report: wmic qfe list full /format:htable >C:\Temp\hotfixes.htm

Using command-line rar.exe to extract zip files

rar.exe e   example: rar.exe e myzip.zip RAR 3.70   Copyright (c) 1993-2007 Alexander Roshal   22 May 2007 Shareware version         Type RAR -? for help Usage:     rar - -                <@listfiles...>   a             Add files to archive   c             Add archive comment   cf            Add files comment   ch            Change archive parameters   cw            Write archive comment to file   d             Delete files from archive   e             Extract files to current directory   f             Freshen files in archive   i[par]=  Find string in archives   k     ...

Script with Robocopy to copy folder to multiple destinations

Below was the script I used to copy folders from one source to multiple destination servers: @Echo off   rem below command will generate something like this 2013-09-01-1100 AM if your date/t=Sun 09/01/2013 & time/t=11:03 AM rem rem below command will generate something like this 2013-09-01-0552 if your date/t = 01/09/2013 & time/t = 05:52   For /f "tokens=1,2,3 delims=/ " %%a in ('date/T') do set CDate=%%c-%%b-%%a   For /f "tokens=1,2 delims=:" %%f in ('time /t') do set CTime=%%f%%g set CDate-CTime=%CDate%-%CTime%   rem @echo CDate-CTime is %CDate-CTime% rem for /F %%i in (serverlist.list) do ( echo Processing %%i... >>RobocopyResult_%CDate-CTime%.txt   robocopy E:\MySourceFolder \\%%i\c$\MyDesinationFolder\ /S /E /ZB /R:5 /NP /TEE  >>RobocopyResult_%CDate-CTime%.txt ) Echo . Echo DONE!!!

Using taskkill to remotely kill processes

Consider, you are unable to login to a server due to not sufficient resource available in the server. And you want to avoid server reboot to resolve this issue. You run pslist from remote server and see lots of processes running with the name " kinconfg.exe" Below is the command to kill remotely the duplicate processes and free-up resources on the problematic server: taskkill /s servername /im kinconfg.exe SUCCESS: The process "kinconfg.exe" with PID 5900 has been terminated. SUCCESS: The process "kinconfg.exe" with PID 10416 has been terminated. After this command is executed, able to login to the server.