2016-04-13 11 views
0

Fsrm.FsrmQuotaManagerEX COMオブジェクトの出力を.XMLにエクスポートする必要があります。このスクリプトを作成して、ソーステンプレート名と、サーバー内の各構成済みのクォータのパスを取得します。 Windows Server 2008のコマンドのCOMオブジェクトをエクスポートするか、XMLに変換する

$cuotaInfo = New-Object -com Fsrm.FsrmQuotaManagerex 
$cuotaInfo.enumcuotas()| select SourceTemplatesName,Path 

出力: Output of the command in Windows server 2008

私は、コマンドレットExport-CliXmlExport-Csvとパイプへの出力をしようとしていますが、私はこのエラーを取得しています:

enter image description here

出力を.xmlや.csvのような管理可能なファイルにエクスポートする方法についてのアイデアはありますか?

+0

投稿したエラーは、データのエクスポートに由来するものではなく、COMオブジェクトの作成によるものです。 –

答えて

1

投稿したエラーメッセージには、タイプFsrm.FsrmQuotaManagerexが認識されないことがはっきりと示されています。実際にクラス名がFsrm.FsrmQuotaManagerの場合は、Fsrm.FsrmQuotaManagerexではなく、驚くことではありません。

PS C:\>$qm = New-Object -COM Fsrm.FsrmQuotaManagerex 
New-Object : Retrieving the COM class factory for component with CLSID 
{00000000-0000-0000-0000-000000000000} failed due to the following error: 
80040154 Class not registered (Exception from HRESULT: 0x80040154 
(REGDB_E_CLASSNOTREG)). 
At line:1 char:7 
+ $qm = New-Object -COM Fsrm.FsrmQuotaManagerex 
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ResourceUnavailable: (:) [New-Object], COMException 
    + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Comman... 

PS C:\>$qm = New-Object -COM Fsrm.FsrmQuotaManager 
PS C:\>$qm.GetType().FullName 
System.__ComObject
関連する問題