SSH right from windows

Want to SSH onto a system but don’t want to install putty? Well, you can do that right from the windows operating system.

Simply start a command prompt and enter the command below

ssh user@system -p 22

For example, if want to connect to a NetScaler device on IP address 10.1.1.27 using the default admin account then you would enter

ssh nsroot@10.1.1.27 -p 22

Display make and model of server hardware

Ever been in that place where you need to know that is the make and model of a server ? For documentation or planning purposes for example ?

You know, the time when you might have to work out what the power draw is of your hardware before moving into a hosted data center or know which spares to hold for physical servers ?

A quick way to get the make and model of the hardware is to run the command below:

wmic computersystem get Name, domain, Manufacturer, Model, NumberofProcessors, PrimaryOwnerName,Username, Roles, totalphysicalmemory /format:list

Getting the cluster size of CSV disks in Hyper-V

If you want to check the cluster size of NTFS formatted disks used for Cluster Shared Volumes, here’s some handy code below. Just change the names of the hyper-v clusters you want to check in red and run from an administrative level powershell prompt.

If you want another row of information from the fsutil command, just change the number where it says $arr[9]

Import-Module FailoverClusters

$Clusters = (“My-CLUSTERNAME01“,”My-CLUSTERNAME02“,”My-CLUSTERNAME03“)

#Get CSVs foreach cluster

foreach($Cluster in $Clusters){

      $c = Get-ClusterSharedVolume -Cluster $Cluster 

     $csvs += $c

}

foreach ($csv in $csvs) {

     invoke-command -ComputerName $csv.ownernode -scriptblock {

                 param ($name,$node)

                 $Clustersize = fsutil fsinfo ntfsinfo “C:ClusterStorage$name” 

                $arr = $Clustersize -split ‘`n’

                write-host $name ” on ” $node ” has ” $arr[9]    

         }   -argumentlist $csv.name, $csv.OwnerNode

}

 

The output reports against the owner node for the CSV. As the underlying disk for the CSV is the same on all nodes, I report against the owner node to limit the output to one row per CSV.

How does my computer know that it is connected to the internet ?

The answer is surprisingly simple for Windows computers. It attempts to connect to

http://www.msftncsi.com/ncsi.txt

NOTE: This address has been updated to www.msftconnecttest.com/connecttest.txt starting with Windows 10, version 1607

If it receives a HTTP 200 (if it receives the text “Microsoft NCSI” in the file) then you are on the internet – if it does not receive this text then you receive the warning symbol on the network item in the system notification area.

So, if you don’t have internet connectivity but need your computer to think you have for some reason (because a piece of sofwtare requires it for a lab or some toher reason) then yuo can simply create your own version of the abve site and file using your internal servers and DNS and fool your computers into thinking that they are indeed internet connected.