Yuuri
Fleet Admiral
- Registriert
- Okt. 2010
- Beiträge
- 13.923
Hallo zusammen,
ich weiß nicht wirklich mit was ich die Suchmaschine füttern soll bzw. brachten mich meine Anfragen gestern nicht zum Ziel, deswegen nun der Thread.
Und zwar frage ich mich, wie ich die Steuerung der Ausgabe regeln kann und welche Properties im Output angezeigt werden (oder auch wie ich den Tabellenkopf formatieren kann).
Bspw. der Output von Get-Disk:
Wo kommt hierbei die Property "Total Size" in der Tabelle her? Als Property selbst im Objekt ist es nicht vorhanden. Per Write-Host kann die Ausgabe nicht stattgefunden haben, sonst stünde das Rückgabeobjekt ja im Output mit drin. Irgend jemand Erfahrung darin oder hat wer einen Tipp parat?
LG
ich weiß nicht wirklich mit was ich die Suchmaschine füttern soll bzw. brachten mich meine Anfragen gestern nicht zum Ziel, deswegen nun der Thread.
Und zwar frage ich mich, wie ich die Steuerung der Ausgabe regeln kann und welche Properties im Output angezeigt werden (oder auch wie ich den Tabellenkopf formatieren kann).
Bspw. der Output von Get-Disk:
Code:
PS C:\Users\claW> get-disk 0 | table -AutoSize; get-disk 0 | gm | sort Name
Number Friendly Name OperationalStatus Total Size Partition Style
------ ------------- ----------------- ---------- ---------------
0 WDC WD2003FYYS-02W0B1 Online 1.82 TB MBR
TypeName: Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk
Name MemberType Definition
---- ---------- ----------
AllocatedSize Property uint64 AllocatedSize {get;}
BootFromDisk Property bool BootFromDisk {get;}
BusType ScriptProperty System.Object BusType {get=switch ($this.psBase.CimInstanceProperties["BusType"].Value)...
Clone Method System.Object ICloneable.Clone()
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj)
FirmwareVersion Property string FirmwareVersion {get;}
FriendlyName Property string FriendlyName {get;}
GetCimSessionComputerName Method string GetCimSessionComputerName()
GetCimSessionInstanceId Method guid GetCimSessionInstanceId()
GetHashCode Method int GetHashCode()
GetObjectData Method void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext co...
GetType Method type GetType()
Guid Property string Guid {get;}
HealthStatus ScriptProperty System.Object HealthStatus {get=switch ($this.psBase.CimInstanceProperties["HealthStatus"].Value)...
IsBoot Property bool IsBoot {get;}
IsClustered Property bool IsClustered {get;}
IsOffline Property bool IsOffline {get;}
IsReadOnly Property bool IsReadOnly {get;}
IsSystem Property bool IsSystem {get;}
LargestFreeExtent Property uint64 LargestFreeExtent {get;}
Location Property string Location {get;}
LogicalSectorSize Property uint32 LogicalSectorSize {get;}
Manufacturer Property string Manufacturer {get;}
Model Property string Model {get;}
Number Property uint32 Number {get;}
NumberOfPartitions Property uint32 NumberOfPartitions {get;}
ObjectId Property string ObjectId {get;}
OfflineReason ScriptProperty System.Object OfflineReason {get=switch ($this.psBase.CimInstanceProperties["OfflineReason"].Value)...
OperationalStatus ScriptProperty System.Object OperationalStatus {get=switch ($this.psBase.CimInstanceProperties["OperationalStatus"].Value)...
PartitionStyle ScriptProperty System.Object PartitionStyle {get=switch ($this.psBase.CimInstanceProperties["PartitionStyle"].Value)...
Path Property string Path {get;}
PhysicalSectorSize Property uint32 PhysicalSectorSize {get;}
ProvisioningType ScriptProperty System.Object ProvisioningType {get=switch ($this.psBase.CimInstanceProperties["ProvisioningType"].Value)...
PSComputerName Property string PSComputerName {get;}
SerialNumber Property string SerialNumber {get;}
Signature Property uint32 Signature {get;}
Size Property uint64 Size {get;}
ToString Method string ToString()
UniqueId Property string UniqueId {get;}
UniqueIdFormat ScriptProperty System.Object UniqueIdFormat {get=switch ($this.psBase.CimInstanceProperties["UniqueIdFormat"].Value)...
LG