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
--
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...
$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