From: Pegasus [MVP] on
See inline.

"Eric" <edouglas(a)blockhouse.com> said this in news item
news:afe5bf19-4d9b-41f5-9b34-7e9fc7bab547(a)k22g2000vbp.googlegroups.com...
> On Jan 8, 4:52 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
>> I gave you an EMail function in my reply of two weeks ago. Did you use
>> the
>> function? If something is not clear then please say exactly what it is.
>>
>> Note also that while WMI is a wonderful thing, it can place a heavy load
>> on
>> the CPU. I recommend that you check your CPU loading before finalising
>> this
>> project.
>>
>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news
>> itemnews:E4204C0F-B9A5-4911-AFCD-0C3BD13AFA8C(a)microsoft.com...
>>
>>
>>
>> > I have this, but as email command??
>>
>> > Option Explicit
>>
>> > Dim strComputer, objWMIService, colMonitoredDisks, objDiskChange
>> > Dim i, strMessage
>> > Const LOCAL_HARD_DISK = 3
>>
>> > strComputer = "West204"
>> > Set objWMIService = GetObject("winmgmts:" &
>> > "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" &
>> > strComputer & "\root\cimv2")
>> > Set colMonitoredDisks = objWMIService.ExecNotificationQuery ("SELECT *
>> > FROM __instancemodificationevent WITHIN 30 WHERE " & "TargetInstance
>> > ISA
>> > 'Win32_LogicalDisk'")
>> > i = 0
>> > Do While i = 0
>> > Set objDiskChange = colMonitoredDisks.NextEvent
>> > If objDiskChange.TargetInstance.DriveType = LOCAL_HARD_DISK Then
>> > If objDiskChange.TargetInstance.Size < 100000000 Then
>> > strMessage = "Hard disk " &
>> > objDiskChange.TargetInstance.Name
>> > & " on computer " & strComputer & " is below 100,000,000 bytes."
>> > End If
>> > End If
>> > Loop
>>
>> > "MiguelA" <ma.camal...(a)NOSPAMgmail.com> wrote in message
>> >news:eJ$ivHjiKHA.5248(a)TK2MSFTNGP04.phx.gbl...
>> >>I will try and tell you something
>>
>> >> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
>> >>news:e4ixPEjiKHA.5568(a)TK2MSFTNGP02.phx.gbl...
>> >>> When you examine and run the script then you will see several things:
>> >>> a) The script will inspect *all* drive letters.
>> >>> b) The property oDrive.Path shows the drive letter (e.g. D:)
>> >>> c) The property oDrive.AvailableSpace shows the amount of free space.
>>
>> >>> You now need to compare oDrive.AvailableSpace against whatever limit
>> >>> you
>> >>> wish to set, then invoke the EMail module if your free space drops
>> >>> below
>> >>> the set limit.
>>
>> >>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
>> >>>news:#9fXH8iiKHA.5524(a)TK2MSFTNGP06.phx.gbl...
>> >>>> I do not understand is as if it detects that there is little space
>> >>>> to
>> >>>> run the email sending.
>> >>>> If a server has multiple disks, it detects all?.
>>
>> >>>> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
>> >>>>news:OJ4oH5iiKHA.1236(a)TK2MSFTNGP04.phx.gbl...
>>
>> >>>>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
>> >>>>>news:86144BCB-29F3-43B4-AF6A-081C68F0E83B(a)microsoft.com...
>> >>>>>> I can not implement all the code!
>>
>> >>>>> The idea is for you to grab the parts that are relevant for you.
>> >>>>> Feel
>> >>>>> free to ask if certain details are unclear.- Hide quoted text -
>>
>> - Show quoted text -
>
> Am I correct that your script in this thread is designed to run
> locally on the server?
*** Yes.

> Is there a way to write a script that can get drive and directory size
> information for a server, running on a client pc with network admin
> credentials?
*** Yes, WMI is one method, psexec.exe another.

> From what I can find on the FSO, it only works on the local pc or
> mapped drives.
*** Correct.

> I have a working script which connects to the servers and gets drive
> space info from Win32_DiskDrive. Now I want more details, to show
> which folders are using the most space, without having the folders
> marked as shared.
> This would seem simple if I ran it locally on the server but I want to
> be able to run it from my client pc and I want it to connect to get
> info from multiple servers.
*** For good performance I would launch psexec.exe from a batch
*** file on the server, to address each client PC in turn.


From: Eric on
On Jan 12, 10:19 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
> See inline.
>
> "Eric" <edoug...(a)blockhouse.com> said this in news itemnews:afe5bf19-4d9b-41f5-9b34-7e9fc7bab547(a)k22g2000vbp.googlegroups.com...
>
>
>
> > On Jan 8, 4:52 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
> >> I gave you an EMail function in my reply of two weeks ago. Did you use
> >> the
> >> function? If something is not clear then please say exactly what it is..
>
> >> Note also that while WMI is a wonderful thing, it can place a heavy load
> >> on
> >> the CPU. I recommend that you check your CPU loading before finalising
> >> this
> >> project.
>
> >> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news
> >> itemnews:E4204C0F-B9A5-4911-AFCD-0C3BD13AFA8C(a)microsoft.com...
>
> >> > I have this, but as email command??
>
> >> > Option Explicit
>
> >> > Dim strComputer, objWMIService, colMonitoredDisks, objDiskChange
> >> > Dim i, strMessage
> >> > Const LOCAL_HARD_DISK = 3
>
> >> > strComputer = "West204"
> >> > Set objWMIService = GetObject("winmgmts:" &
> >> > "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\"  &
> >> > strComputer & "\root\cimv2")
> >> > Set colMonitoredDisks = objWMIService.ExecNotificationQuery  ("SELECT *
> >> > FROM __instancemodificationevent WITHIN 30 WHERE "  & "TargetInstance
> >> > ISA
> >> > 'Win32_LogicalDisk'")
> >> > i = 0
> >> > Do While i = 0
> >> >    Set objDiskChange = colMonitoredDisks.NextEvent
> >> >    If objDiskChange.TargetInstance.DriveType = LOCAL_HARD_DISK Then
> >> >        If objDiskChange.TargetInstance.Size < 100000000 Then
> >> >            strMessage = "Hard disk "  &
> >> > objDiskChange.TargetInstance.Name
> >> > & " on computer " & strComputer & " is below 100,000,000 bytes."
> >> >          End If
> >> >    End If
> >> > Loop
>
> >> > "MiguelA" <ma.camal...(a)NOSPAMgmail.com> wrote in message
> >> >news:eJ$ivHjiKHA.5248(a)TK2MSFTNGP04.phx.gbl...
> >> >>I will try and tell you something
>
> >> >> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
> >> >>news:e4ixPEjiKHA.5568(a)TK2MSFTNGP02.phx.gbl...
> >> >>> When you examine and run the script then you will see several things:
> >> >>> a) The script will inspect *all* drive letters.
> >> >>> b) The property oDrive.Path shows the drive letter (e.g. D:)
> >> >>> c) The property oDrive.AvailableSpace shows the amount of free space.
>
> >> >>> You now need to compare oDrive.AvailableSpace against whatever limit
> >> >>> you
> >> >>> wish to set, then invoke the EMail module if your free space drops
> >> >>> below
> >> >>> the set limit.
>
> >> >>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
> >> >>>news:#9fXH8iiKHA.5524(a)TK2MSFTNGP06.phx.gbl...
> >> >>>> I do not understand is as if it detects that there is little space
> >> >>>> to
> >> >>>> run the email sending.
> >> >>>> If a server has multiple disks, it detects all?.
>
> >> >>>> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
> >> >>>>news:OJ4oH5iiKHA.1236(a)TK2MSFTNGP04.phx.gbl...
>
> >> >>>>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
> >> >>>>>news:86144BCB-29F3-43B4-AF6A-081C68F0E83B(a)microsoft.com...
> >> >>>>>> I can not implement all the code!
>
> >> >>>>> The idea is for you to grab the parts that are relevant for you.
> >> >>>>> Feel
> >> >>>>> free to ask if certain details are unclear.- Hide quoted text -
>
> >> - Show quoted text -
>
> > Am I correct that your script in this thread is designed to run
> > locally on the server?
>
> *** Yes.
>
> > Is there a way to write a script that can get drive and directory size
> > information for a server, running on a client pc with network admin
> > credentials?
>
> *** Yes, WMI is one method, psexec.exe another.
>
> > From what I can find on the FSO, it only works on the local pc or
> > mapped drives.
>
> *** Correct.
>
> > I have a working script which connects to the servers and gets drive
> > space info from Win32_DiskDrive.  Now I want more details, to show
> > which folders are using the most space, without having the folders
> > marked as shared.
> > This would seem simple if I ran it locally on the server but I want to
> > be able to run it from my client pc and I want it to connect to get
> > info from multiple servers.
>
> *** For good performance I would launch psexec.exe from a batch
> *** file on the server, to address each client PC in turn.- Hide quoted text -
>
> - Show quoted text -

So you're saying the only way to get directory size information for
another PC for all folders, not just shared folders, is to run a local
FSO script using PsTools (http://technet.microsoft.com/en-us/
sysinternals/bb897553.aspx)?
From: ekrengel on
On Jan 12, 10:19 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
> See inline.
>
> "Eric" <edoug...(a)blockhouse.com> said this in news itemnews:afe5bf19-4d9b-41f5-9b34-7e9fc7bab547(a)k22g2000vbp.googlegroups.com...
>
> > On Jan 8, 4:52 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
> >> I gave you an EMail function in my reply of two weeks ago. Did you use
> >> the
> >> function? If something is not clear then please say exactly what it is..
>
> >> Note also that while WMI is a wonderful thing, it can place a heavy load
> >> on
> >> the CPU. I recommend that you check your CPU loading before finalising
> >> this
> >> project.
>
> >> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news
> >> itemnews:E4204C0F-B9A5-4911-AFCD-0C3BD13AFA8C(a)microsoft.com...
>
> >> > I have this, but as email command??
>
> >> > Option Explicit
>
> >> > Dim strComputer, objWMIService, colMonitoredDisks, objDiskChange
> >> > Dim i, strMessage
> >> > Const LOCAL_HARD_DISK = 3
>
> >> > strComputer = "West204"
> >> > Set objWMIService = GetObject("winmgmts:" &
> >> > "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\"  &
> >> > strComputer & "\root\cimv2")
> >> > Set colMonitoredDisks = objWMIService.ExecNotificationQuery  ("SELECT *
> >> > FROM __instancemodificationevent WITHIN 30 WHERE "  & "TargetInstance
> >> > ISA
> >> > 'Win32_LogicalDisk'")
> >> > i = 0
> >> > Do While i = 0
> >> >    Set objDiskChange = colMonitoredDisks.NextEvent
> >> >    If objDiskChange.TargetInstance.DriveType = LOCAL_HARD_DISK Then
> >> >        If objDiskChange.TargetInstance.Size < 100000000 Then
> >> >            strMessage = "Hard disk "  &
> >> > objDiskChange.TargetInstance.Name
> >> > & " on computer " & strComputer & " is below 100,000,000 bytes."
> >> >          End If
> >> >    End If
> >> > Loop
>
> >> > "MiguelA" <ma.camal...(a)NOSPAMgmail.com> wrote in message
> >> >news:eJ$ivHjiKHA.5248(a)TK2MSFTNGP04.phx.gbl...
> >> >>I will try and tell you something
>
> >> >> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
> >> >>news:e4ixPEjiKHA.5568(a)TK2MSFTNGP02.phx.gbl...
> >> >>> When you examine and run the script then you will see several things:
> >> >>> a) The script will inspect *all* drive letters.
> >> >>> b) The property oDrive.Path shows the drive letter (e.g. D:)
> >> >>> c) The property oDrive.AvailableSpace shows the amount of free space.
>
> >> >>> You now need to compare oDrive.AvailableSpace against whatever limit
> >> >>> you
> >> >>> wish to set, then invoke the EMail module if your free space drops
> >> >>> below
> >> >>> the set limit.
>
> >> >>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
> >> >>>news:#9fXH8iiKHA.5524(a)TK2MSFTNGP06.phx.gbl...
> >> >>>> I do not understand is as if it detects that there is little space
> >> >>>> to
> >> >>>> run the email sending.
> >> >>>> If a server has multiple disks, it detects all?.
>
> >> >>>> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
> >> >>>>news:OJ4oH5iiKHA.1236(a)TK2MSFTNGP04.phx.gbl...
>
> >> >>>>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
> >> >>>>>news:86144BCB-29F3-43B4-AF6A-081C68F0E83B(a)microsoft.com...
> >> >>>>>> I can not implement all the code!
>
> >> >>>>> The idea is for you to grab the parts that are relevant for you.
> >> >>>>> Feel
> >> >>>>> free to ask if certain details are unclear.- Hide quoted text -
>
> >> - Show quoted text -
>
> > Am I correct that your script in this thread is designed to run
> > locally on the server?
>
> *** Yes.
>
> > Is there a way to write a script that can get drive and directory size
> > information for a server, running on a client pc with network admin
> > credentials?
>
> *** Yes, WMI is one method, psexec.exe another.
>
> > From what I can find on the FSO, it only works on the local pc or
> > mapped drives.
>
> *** Correct.
>
> > I have a working script which connects to the servers and gets drive
> > space info from Win32_DiskDrive.  Now I want more details, to show
> > which folders are using the most space, without having the folders
> > marked as shared.
> > This would seem simple if I ran it locally on the server but I want to
> > be able to run it from my client pc and I want it to connect to get
> > info from multiple servers.
>
> *** For good performance I would launch psexec.exe from a batch
> *** file on the server, to address each client PC in turn.

How were you planning to show which folders were using the most space,
locally? Do you have a script for this locally?
From: Pegasus [MVP] on


"ekrengel" <erickrengel5(a)gmail.com> said this in news item
news:0a7ac89e-0ff6-4969-a21d-5726990930bb(a)3g2000vbp.googlegroups.com...
> On Jan 12, 10:19 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
>> See inline.
>>
>> "Eric" <edoug...(a)blockhouse.com> said this in news
>> itemnews:afe5bf19-4d9b-41f5-9b34-7e9fc7bab547(a)k22g2000vbp.googlegroups.com...
>>
>> > On Jan 8, 4:52 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
>> >> I gave you an EMail function in my reply of two weeks ago. Did you use
>> >> the
>> >> function? If something is not clear then please say exactly what it
>> >> is.
>>
>> >> Note also that while WMI is a wonderful thing, it can place a heavy
>> >> load
>> >> on
>> >> the CPU. I recommend that you check your CPU loading before finalising
>> >> this
>> >> project.
>>
>> >> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news
>> >> itemnews:E4204C0F-B9A5-4911-AFCD-0C3BD13AFA8C(a)microsoft.com...
>>
>> >> > I have this, but as email command??
>>
>> >> > Option Explicit
>>
>> >> > Dim strComputer, objWMIService, colMonitoredDisks, objDiskChange
>> >> > Dim i, strMessage
>> >> > Const LOCAL_HARD_DISK = 3
>>
>> >> > strComputer = "West204"
>> >> > Set objWMIService = GetObject("winmgmts:" &
>> >> > "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" &
>> >> > strComputer & "\root\cimv2")
>> >> > Set colMonitoredDisks = objWMIService.ExecNotificationQuery
>> >> > ("SELECT *
>> >> > FROM __instancemodificationevent WITHIN 30 WHERE " &
>> >> > "TargetInstance
>> >> > ISA
>> >> > 'Win32_LogicalDisk'")
>> >> > i = 0
>> >> > Do While i = 0
>> >> > Set objDiskChange = colMonitoredDisks.NextEvent
>> >> > If objDiskChange.TargetInstance.DriveType = LOCAL_HARD_DISK Then
>> >> > If objDiskChange.TargetInstance.Size < 100000000 Then
>> >> > strMessage = "Hard disk " &
>> >> > objDiskChange.TargetInstance.Name
>> >> > & " on computer " & strComputer & " is below 100,000,000 bytes."
>> >> > End If
>> >> > End If
>> >> > Loop
>>
>> >> > "MiguelA" <ma.camal...(a)NOSPAMgmail.com> wrote in message
>> >> >news:eJ$ivHjiKHA.5248(a)TK2MSFTNGP04.phx.gbl...
>> >> >>I will try and tell you something
>>
>> >> >> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
>> >> >>news:e4ixPEjiKHA.5568(a)TK2MSFTNGP02.phx.gbl...
>> >> >>> When you examine and run the script then you will see several
>> >> >>> things:
>> >> >>> a) The script will inspect *all* drive letters.
>> >> >>> b) The property oDrive.Path shows the drive letter (e.g. D:)
>> >> >>> c) The property oDrive.AvailableSpace shows the amount of free
>> >> >>> space.
>>
>> >> >>> You now need to compare oDrive.AvailableSpace against whatever
>> >> >>> limit
>> >> >>> you
>> >> >>> wish to set, then invoke the EMail module if your free space drops
>> >> >>> below
>> >> >>> the set limit.
>>
>> >> >>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
>> >> >>>news:#9fXH8iiKHA.5524(a)TK2MSFTNGP06.phx.gbl...
>> >> >>>> I do not understand is as if it detects that there is little
>> >> >>>> space
>> >> >>>> to
>> >> >>>> run the email sending.
>> >> >>>> If a server has multiple disks, it detects all?.
>>
>> >> >>>> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
>> >> >>>>news:OJ4oH5iiKHA.1236(a)TK2MSFTNGP04.phx.gbl...
>>
>> >> >>>>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
>> >> >>>>>news:86144BCB-29F3-43B4-AF6A-081C68F0E83B(a)microsoft.com...
>> >> >>>>>> I can not implement all the code!
>>
>> >> >>>>> The idea is for you to grab the parts that are relevant for you.
>> >> >>>>> Feel
>> >> >>>>> free to ask if certain details are unclear.- Hide quoted text -
>>
>> >> - Show quoted text -
>>
>> > Am I correct that your script in this thread is designed to run
>> > locally on the server?
>>
>> *** Yes.
>>
>> > Is there a way to write a script that can get drive and directory size
>> > information for a server, running on a client pc with network admin
>> > credentials?
>>
>> *** Yes, WMI is one method, psexec.exe another.
>>
>> > From what I can find on the FSO, it only works on the local pc or
>> > mapped drives.
>>
>> *** Correct.
>>
>> > I have a working script which connects to the servers and gets drive
>> > space info from Win32_DiskDrive. Now I want more details, to show
>> > which folders are using the most space, without having the folders
>> > marked as shared.
>> > This would seem simple if I ran it locally on the server but I want to
>> > be able to run it from my client pc and I want it to connect to get
>> > info from multiple servers.
>>
>> *** For good performance I would launch psexec.exe from a batch
>> *** file on the server, to address each client PC in turn.
>
> How were you planning to show which folders were using the most space,
> locally? Do you have a script for this locally?

Yes, I wrote a script for this some time ago. It's a console script and most
people prefer a pretty GUI such as these:
DriveUse:
http://members.ozemail.com.au/~nulifetv/freezip/freeware/index.html
Bullet Proof Folder sizes: http://www.foldersizes.com/


From: Pegasus [MVP] on


"Eric" <edouglas(a)blockhouse.com> said this in news item
news:63b31a85-0957-429b-ac88-7c6f5c8ad4b5(a)m11g2000vbo.googlegroups.com...
> On Jan 12, 10:19 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
>> See inline.
>>
>> "Eric" <edoug...(a)blockhouse.com> said this in news
>> itemnews:afe5bf19-4d9b-41f5-9b34-7e9fc7bab547(a)k22g2000vbp.googlegroups.com...
>>
>>
>>
>> > On Jan 8, 4:52 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
>> >> I gave you an EMail function in my reply of two weeks ago. Did you use
>> >> the
>> >> function? If something is not clear then please say exactly what it
>> >> is.
>>
>> >> Note also that while WMI is a wonderful thing, it can place a heavy
>> >> load
>> >> on
>> >> the CPU. I recommend that you check your CPU loading before finalising
>> >> this
>> >> project.
>>
>> >> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news
>> >> itemnews:E4204C0F-B9A5-4911-AFCD-0C3BD13AFA8C(a)microsoft.com...
>>
>> >> > I have this, but as email command??
>>
>> >> > Option Explicit
>>
>> >> > Dim strComputer, objWMIService, colMonitoredDisks, objDiskChange
>> >> > Dim i, strMessage
>> >> > Const LOCAL_HARD_DISK = 3
>>
>> >> > strComputer = "West204"
>> >> > Set objWMIService = GetObject("winmgmts:" &
>> >> > "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" &
>> >> > strComputer & "\root\cimv2")
>> >> > Set colMonitoredDisks = objWMIService.ExecNotificationQuery
>> >> > ("SELECT *
>> >> > FROM __instancemodificationevent WITHIN 30 WHERE " &
>> >> > "TargetInstance
>> >> > ISA
>> >> > 'Win32_LogicalDisk'")
>> >> > i = 0
>> >> > Do While i = 0
>> >> > Set objDiskChange = colMonitoredDisks.NextEvent
>> >> > If objDiskChange.TargetInstance.DriveType = LOCAL_HARD_DISK Then
>> >> > If objDiskChange.TargetInstance.Size < 100000000 Then
>> >> > strMessage = "Hard disk " &
>> >> > objDiskChange.TargetInstance.Name
>> >> > & " on computer " & strComputer & " is below 100,000,000 bytes."
>> >> > End If
>> >> > End If
>> >> > Loop
>>
>> >> > "MiguelA" <ma.camal...(a)NOSPAMgmail.com> wrote in message
>> >> >news:eJ$ivHjiKHA.5248(a)TK2MSFTNGP04.phx.gbl...
>> >> >>I will try and tell you something
>>
>> >> >> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
>> >> >>news:e4ixPEjiKHA.5568(a)TK2MSFTNGP02.phx.gbl...
>> >> >>> When you examine and run the script then you will see several
>> >> >>> things:
>> >> >>> a) The script will inspect *all* drive letters.
>> >> >>> b) The property oDrive.Path shows the drive letter (e.g. D:)
>> >> >>> c) The property oDrive.AvailableSpace shows the amount of free
>> >> >>> space.
>>
>> >> >>> You now need to compare oDrive.AvailableSpace against whatever
>> >> >>> limit
>> >> >>> you
>> >> >>> wish to set, then invoke the EMail module if your free space drops
>> >> >>> below
>> >> >>> the set limit.
>>
>> >> >>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
>> >> >>>news:#9fXH8iiKHA.5524(a)TK2MSFTNGP06.phx.gbl...
>> >> >>>> I do not understand is as if it detects that there is little
>> >> >>>> space
>> >> >>>> to
>> >> >>>> run the email sending.
>> >> >>>> If a server has multiple disks, it detects all?.
>>
>> >> >>>> "Pegasus [MVP]" <n...(a)microsoft.com> wrote in message
>> >> >>>>news:OJ4oH5iiKHA.1236(a)TK2MSFTNGP04.phx.gbl...
>>
>> >> >>>>> "MiguelA" <ma.camal...(a)NOSPAMgmail.com> said this in news item
>> >> >>>>>news:86144BCB-29F3-43B4-AF6A-081C68F0E83B(a)microsoft.com...
>> >> >>>>>> I can not implement all the code!
>>
>> >> >>>>> The idea is for you to grab the parts that are relevant for you.
>> >> >>>>> Feel
>> >> >>>>> free to ask if certain details are unclear.- Hide quoted text -
>>
>> >> - Show quoted text -
>>
>> > Am I correct that your script in this thread is designed to run
>> > locally on the server?
>>
>> *** Yes.
>>
>> > Is there a way to write a script that can get drive and directory size
>> > information for a server, running on a client pc with network admin
>> > credentials?
>>
>> *** Yes, WMI is one method, psexec.exe another.
>>
>> > From what I can find on the FSO, it only works on the local pc or
>> > mapped drives.
>>
>> *** Correct.
>>
>> > I have a working script which connects to the servers and gets drive
>> > space info from Win32_DiskDrive. Now I want more details, to show
>> > which folders are using the most space, without having the folders
>> > marked as shared.
>> > This would seem simple if I ran it locally on the server but I want to
>> > be able to run it from my client pc and I want it to connect to get
>> > info from multiple servers.
>>
>> *** For good performance I would launch psexec.exe from a batch
>> *** file on the server, to address each client PC in turn.- Hide quoted
>> text -
>>
>> - Show quoted text -
>
> So you're saying the only way to get directory size information for
> another PC for all folders, not just shared folders, is to run a local
> FSO script using PsTools (http://technet.microsoft.com/en-us/
> sysinternals/bb897553.aspx)?

*** No. I wrote "WMI is one method, psexec.exe another". You should also
look at the OP's script - he uses WMI.