none
Need VB script or Batch file to query Dirty bit RRS feed

  • Question

  • Hi Friends,

    Could anybody help me in setting up a script which can query Dirty bit on all volumes of 50 servers ?

    Thanks

    Thursday, July 31, 2014 11:48 AM

Answers

All replies

    • Proposed as answer by jrv Thursday, July 31, 2014 12:52 PM
    • Marked as answer by ScriptingWifeModerator Monday, August 11, 2014 11:44 PM
    Thursday, July 31, 2014 12:42 PM
  • fsutil dirty query C:

    See: http://technet.microsoft.com/en-us/library/bb490641.aspx

    http://msdn.microsoft.com/en-us/library/aa394515(v=vs.85).aspx

    Get-WmiObject Win32_Volume -computer 'server1','server2'... | Select SystemName, DirtyBitSet


    ¯\_(ツ)_/¯


    • Edited by jrv Thursday, July 31, 2014 12:50 PM
    Thursday, July 31, 2014 12:47 PM
  • The repository, as Mike has pointed out, has scripts.

    ¯\_(ツ)_/¯

    Thursday, July 31, 2014 12:52 PM
  • Mike / JRV,

    With your help, I could make a script which can find the local drives in a server. But i am blocked to proceed with dirty bit check on those local drives.

    Iam trying my level to find it out :)

    Thanks

    Arun

    Thursday, July 31, 2014 3:14 PM
  • Mike / JRV,

    With your help, I could make a script which can find the local drives in a server. But i am blocked to proceed with dirty bit check on those local drives.

    Iam trying my level to find it out :)

    Thanks

    Arun

    You didn't look in the Repository did you?  You also didn't try the code posted above.  We cannot do this for you or would you like someone to remote into your system and do the typing?                     

    fsutil dirty query C:


    ¯\_(ツ)_/¯


    • Edited by jrv Thursday, July 31, 2014 3:18 PM
    Thursday, July 31, 2014 3:17 PM
  • Yes I have looked into the repository, which gave me the idea to make the script on fetching the local drive details. I know the command fsutil which allows me to do it on each server, but i am trying this to make it in script so that it can be done at one shot.

    Thanks

    Thursday, July 31, 2014 4:11 PM
  • Yes I have looked into the repository, which gave me the idea to make the script on fetching the local drive details. I know the command fsutil which allows me to do it on each server, but i am trying this to make it in script so that it can be done at one shot.

    Thanks

    What have you tried and what does " so that it can be done at one shot" mean?

    This does everything that you asked for:

    Get-WmiObject Win32_Volume -computer 'server1','server2'... | Select SystemName, DirtyBitSet


    ¯\_(ツ)_/¯

    Thursday, July 31, 2014 4:27 PM