Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Using ADSI in NT4 domain

Reply
 
Old 11-27-2006   #1 (permalink)
sluice


 
 

Using ADSI in NT4 domain

I would like to check disk sizes and free space on NT4 PDC & BDCs. How can I
do this in Powershell? Access through ADSI seems problematical.

My System SpecsSystem Spec
Old 11-27-2006   #2 (permalink)
Marco Shaw


 
 

Re: Using ADSI in NT4 domain


"sluice" <sluice@discussions.microsoft.com> wrote in message
news:7C90802B-53F3-4B74-9E83-AEF6D9294AEA@microsoft.com...
>I would like to check disk sizes and free space on NT4 PDC & BDCs. How can
>I
> do this in Powershell? Access through ADSI seems problematical.


Powershell requires .NET. Is that even supported on NT4? I would think
going with VBscript would be a better route.

You're trying to determine the space and size on the PDC/BDC itself, or all
computers joined to a domain?

Marco


My System SpecsSystem Spec
Old 11-27-2006   #3 (permalink)
sluice


 
 

Re: Using ADSI in NT4 domain

Marco,
I am running this script on my XP workstation with all the necessary .NET
framework installed. The NT4 environment that I want to query doesn't have to
be running .NET framework I would have thought. As long as it supports COM &
ADSI queries, it should return the information, shouldn't it?

"Marco Shaw" wrote:

>
> "sluice" <sluice@discussions.microsoft.com> wrote in message
> news:7C90802B-53F3-4B74-9E83-AEF6D9294AEA@microsoft.com...
> >I would like to check disk sizes and free space on NT4 PDC & BDCs. How can
> >I
> > do this in Powershell? Access through ADSI seems problematical.

>
> Powershell requires .NET. Is that even supported on NT4? I would think
> going with VBscript would be a better route.
>
> You're trying to determine the space and size on the PDC/BDC itself, or all
> computers joined to a domain?
>
> Marco
>
>
>

My System SpecsSystem Spec
Old 11-27-2006   #4 (permalink)
sluice


 
 

Re: Using ADSI in NT4 domain

Sorry, Marco, I didn't reply to all your questions. I want to query all the
servers (some 2003 member servers) in the domain.

"Marco Shaw" wrote:

>
> "sluice" <sluice@discussions.microsoft.com> wrote in message
> news:7C90802B-53F3-4B74-9E83-AEF6D9294AEA@microsoft.com...
> >I would like to check disk sizes and free space on NT4 PDC & BDCs. How can
> >I
> > do this in Powershell? Access through ADSI seems problematical.

>
> Powershell requires .NET. Is that even supported on NT4? I would think
> going with VBscript would be a better route.
>
> You're trying to determine the space and size on the PDC/BDC itself, or all
> computers joined to a domain?
>
> Marco
>
>
>

My System SpecsSystem Spec
Old 11-27-2006   #5 (permalink)
dreeschkind


 
 

RE: Using ADSI in NT4 domain

Not sure about NT4, but maybe it is possible via WMI?

$computer = '127.0.0.1';
Get-WmiObject Win32_LogicalDisk -computer $computer |
Select VolumeName,FreeSpace,Size,
@{e={[int64]$_.Size - [int64]$_.FreeSpace};n='Used'}

--
greetings
dreeschkind

"sluice" wrote:

> I would like to check disk sizes and free space on NT4 PDC & BDCs. How can I
> do this in Powershell? Access through ADSI seems problematical.

My System SpecsSystem Spec
Old 11-28-2006   #6 (permalink)
sluice


 
 

RE: Using ADSI in NT4 domain

Hi, dreeschkind
Unfortunately, without having installed WMI on the NT4 servers (it doesn't
come natively), I can't use it. That's why I was hoping to use
fso.GetDrive(fso.GetDriveName(drvPath)).TotalSize
see
http://msdn.microsoft.com/library/de...926cd4d2e8.asp


"dreeschkind" wrote:

> Not sure about NT4, but maybe it is possible via WMI?
>
> $computer = '127.0.0.1';
> Get-WmiObject Win32_LogicalDisk -computer $computer |
> Select VolumeName,FreeSpace,Size,
> @{e={[int64]$_.Size - [int64]$_.FreeSpace};n='Used'}
>
> --
> greetings
> dreeschkind
>
> "sluice" wrote:
>
> > I would like to check disk sizes and free space on NT4 PDC & BDCs. How can I
> > do this in Powershell? Access through ADSI seems problematical.

My System SpecsSystem Spec
Old 11-28-2006   #7 (permalink)
dreeschkind


 
 

RE: Using ADSI in NT4 domain

Well, you can, but AFAIK not remotely:

PS> $fso = new-object -com Scripting.FileSystemObject
PS> $fso.GetDrive($fso.GetDriveName('C:')).TotalSize
17955782656

--
greetings
dreeschkind

"sluice" wrote:

> Hi, dreeschkind
> Unfortunately, without having installed WMI on the NT4 servers (it doesn't
> come natively), I can't use it. That's why I was hoping to use
> fso.GetDrive(fso.GetDriveName(drvPath)).TotalSize
> see
> http://msdn.microsoft.com/library/de...926cd4d2e8.asp
>
>
> "dreeschkind" wrote:
>
> > Not sure about NT4, but maybe it is possible via WMI?
> >
> > $computer = '127.0.0.1';
> > Get-WmiObject Win32_LogicalDisk -computer $computer |
> > Select VolumeName,FreeSpace,Size,
> > @{e={[int64]$_.Size - [int64]$_.FreeSpace};n='Used'}
> >
> > --
> > greetings
> > dreeschkind
> >
> > "sluice" wrote:
> >
> > > I would like to check disk sizes and free space on NT4 PDC & BDCs. How can I
> > > do this in Powershell? Access through ADSI seems problematical.

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Is ADSI encrypted? PowerShell
error when using adsi PowerShell
Frustrating ADSI PowerShell
[ADSI] Syntax PowerShell
[ADSI] getting COM properties . PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46