Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

new-object -com and Microsoft.Diskquota.1

44 views
Skip to first unread message

Stephan Winkler

unread,
Feb 17, 2007, 6:08:40 AM2/17/07
to
Hello,

i´m trying to work with quotas without success.


$disk = "D:\"
$quota = new-object -com "Microsoft.Diskquota.1"

$quota | gm
------------------------------------------------------------------------------------
Name MemberType Definition
---- ---------- ----------
_NewEnum Method IDispatch _NewEnum ()
AddUser Method DIDiskQuotaUser AddUser
(string)
DeleteUser Method void DeleteUser
(DIDiskQuotaUser)
FindUser Method DIDiskQuotaUser FindUser
(string)
GiveUserNameResolutionPriority Method void
GiveUserNameResolutionPriorit...
Initialize Method void Initialize (string,
bool)
InvalidateSidNameCache Method void InvalidateSidNameCache
()
ShutdownNameResolution Method void ShutdownNameResolution
()
TranslateLogonNameToSID Method string
TranslateLogonNameToSID (st...
DefaultQuotaLimit Property double DefaultQuotaLimit ()
{get} ...
DefaultQuotaLimitText Property string DefaultQuotaLimitText
() {g...
DefaultQuotaThreshold Property double DefaultQuotaThreshold
() {g...
DefaultQuotaThresholdText Property string
DefaultQuotaThresholdText (...
LogQuotaLimit Property bool LogQuotaLimit () {get}
{set}
LogQuotaThreshold Property bool LogQuotaThreshold ()
{get} {s...
QuotaFileIncomplete Property bool QuotaFileIncomplete ()
{get}
QuotaFileRebuilding Property bool QuotaFileRebuilding ()
{get}
QuotaState Property QuotaStateConstants
QuotaState () ...
UserNameResolution Property UserNameResolutionConstants
UserNa...

-------------------------------------------------------------------------------------

$quota.Initialize($disk,$true) < this fails with

Exception calling "Initialize" with "2" argument(s): "unknown
language. (Exception from HRESULT: 0x8002000C (DISP_E_UNKNOWNLCID))"


Bye,

Stephan

jar

unread,
May 8, 2007, 5:49:48 PM5/8/07
to

Have you solved the problem with diskquota?


--
jar

Don Jones [MVP]

unread,
May 8, 2007, 7:32:17 PM5/8/07
to
Has who solved it? What problem? :)

--
Don Jones
Windows PowerShell MVP
Founder: www.ScriptingAnswers.com
Co-Author: "Windows PowerShell: TFM"

"jar" <jar.2...@no-mx.forums.net> wrote in message
news:jar.2...@no-mx.forums.net...

jar

unread,
May 12, 2007, 10:52:28 AM5/12/07
to

The problem with instanciating the Microsoft.Diskquota.1 COM object. Try
this:

$disk = "C:"


$quota = new-object -com "Microsoft.Diskquota.1"

$quota.Initialize($disk,$true)

Dosen't work and WMI is way to slow to enumerate the quota when you
have 10000+ quotaobjects.


--
jar

0 new messages