There are some basic tasks one needs to do every once in a while that can not be found in a GUI… for example rescanning your disks on a host when you’ve expanded it on your storage.
Normally I would turn to a command prompt and use diskpart for this one.
But here I am, totally nuts on PowerShell and having to use an old fashioned commandprompt? I think not!
With the following command, in PowerShell, you can rescan your disks ![]()
"rescan" | diskpart
Every once in a while I ‘m asked by a customer to troubleshoot issues on clusters (windows clusters or Hyper-V clusters… no difference for the purpose of this post). One of the first things I do is to getting information of which generating and gathering the cluster log files.
I used to logon to every server, create the file, copy it to my laptop and when I had all the files I could start troubleshooting… as you may suspect, this can take some time and is basically ‘manual labor’. How can I automate this a little?
With the following command (run on a node in the cluster) you generate the log files for each node… but are saved on the node you are logged on to. This saves you connecting to all the nodes one by one and generating the files by hand, etc. ![]()
cluster /cluster:clustername log /gen /copy:.
But… this is done with the use of cluster.exe which is to disappear in a future Windows Server release. How can we do this in PowerShell?
Well… rather easy actually ![]()
Get-Cluster | foreach {get-clusterlog –destination D:\Temp}

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 