WMI New Disks in Windows 2008 R2 comes with state OFFLINE change via WMI from OFFLINE to ONLINE state
New Disks comes in Windows 2008 and Windows 2008 R2 as offline. it's possible to change that via WMI Method to online ? Or I have really to use diskpart like:
select disk 2
online disk
thanks
kind regards,
Sw
July 28th, 2010 4:16pm
hi ,
can you check the below API and post back.
http://msdn.microsoft.com/en-us/library/ff567016%28VS.85%29.aspx
August 2nd, 2010 10:35am
hi,
there is nothing inside this link, that handle this problem.
Because Windows 2008 and Windows 2008 R2 handles "new" disks other then W2003. And the disks will show as offline, if you map it. After that you have to set the this as online then Windows will read the partition and maps the drive letter etc.
So this WMI classes always handle steps deeper to map the drives to windows, but no one to set the disk after mapping in "online" status.
That's a really need to can handle that status. And not only with diskpart !
thanks
kind regards,
Mathias
Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2010 10:52am
You could change it on the servers so that they don't default to Offline. To do this:
Open up a command prompt using "Run As Administrator"
Type diskpart
Type san
If it is currently says SAN Policy : Offline Shared
then you will need to type the following to resolve this:
SAN POLICY=OnlineAll
October 14th, 2010 12:28pm
This is an excellent suggestion, but even with the SAN policy set to OnlineAll new drives presented via iSCSI to the 2008R2 server do not automatically mount - they still have to be manually brought online using diskpart. So I too am looking for
a WMI option. Anyone?
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 1:40pm