Infos über das System Powershell: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 4: | Zeile 4: | ||
;Versions Property | ;Versions Property | ||
*Get-ComputerInfo -Property "*version" | *Get-ComputerInfo -Property "*version" | ||
== | =Auflisten von BIOS-Informationen= | ||
*Get-CimInstance -ClassName Win32_BIOS | *Get-CimInstance -ClassName Win32_BIOS | ||
<pre> | <pre> | ||
| Zeile 14: | Zeile 14: | ||
Version : BOCHS - 1 | Version : BOCHS - 1 | ||
</pre> | </pre> | ||
=Auflisten von Desktopeinstellungen= | |||
*Get-CimInstance -ClassName Win32_Desktop | |||
*Get-CimInstance -ClassName Win32_Desktop | |||
<pre> | <pre> | ||
SettingID Name ScreenSaverActive ScreenSaverSecure ScreenSaverTimeout | SettingID Name ScreenSaverActive ScreenSaverSecure ScreenSaverTimeout | ||
--------- ---- ----------------- ----------------- ------------------ | --------- ---- ----------------- ----------------- ------------------ | ||
| Zeile 38: | Zeile 26: | ||
TOMWIN\Administrator False | TOMWIN\Administrator False | ||
.DEFAULT False | .DEFAULT False | ||
</pre> | </pre> | ||
=Auflisten von Prozessorinformationen= | |||
*Get-CimInstance -ClassName Win32_Processor | Select-Object -ExcludeProperty "CIM*" | |||
<pre> | |||
Get-CimInstance -ClassName Win32_Processor | Select-Object -ExcludeProperty "CIM*" | |||
</pre> | |||
=Auflisten von Informationen zum Computerhersteller und -modell= | |||
*Get-CimInstance -ClassName Win32_ComputerSystem | |||
<pre> | |||
Name PrimaryOwnerName Domain TotalPhysicalMemory Model Manufacturer | |||
---- ---------------- ------ ------------------- ----- ------------ | |||
TOMWIN xinux WORKGROUP 8589344768 Standard PC (Q35 +... QEMU | |||
</pre> | |||
=Auflisten installierter Hotfixes= | |||
*Get-CimInstance -ClassName Win32_QuickFixEngineering | |||
<pre> | |||
Source Description HotFixID InstalledBy InstalledOn | |||
------ ----------- -------- ----------- ----------- | |||
Update KB5006365 NT-AUTORITÄT\SYSTEM 10.11.2021 00:00:00 | |||
Update KB4562830 NT-AUTORITÄT\SYSTEM 21.10.2021 00:00:00 | |||
Security Update KB4570334 18.11.2020 00:00:00 | |||
Security Update KB4580325 19.11.2020 00:00:00 | |||
Security Update KB4586864 19.11.2020 00:00:00 | |||
Update KB5005716 NT-AUTORITÄT\SYSTEM 21.10.2021 00:00:00 | |||
Security Update KB5007186 NT-AUTORITÄT\SYSTEM 10.11.2021 00:00:00 | |||
Update KB5006753 NT-AUTORITÄT\SYSTEM 10.11.2021 00:00:00 | |||
Security Update KB5005699 NT-AUTORITÄT\SYSTEM 21.10.2021 00:00:00 | |||
</pre> | |||
=Auflisten von Informationen zur Betriebssystemversion= | |||
*Get-CimInstance -ClassName Win32_OperatingSystem | | |||
Select-Object -Property BuildNumber,BuildType,OSType,ServicePackMajorVersion,ServicePackMinorVersion | |||
<pre> | |||
BuildNumber : 19042 | |||
BuildType : Multiprocessor Free | |||
OSType : 18 | |||
ServicePackMajorVersion : 0 | |||
ServicePackMinorVersion : 0 | |||
</pre> | |||
=Auflisten der lokalen Benutzer und des Besitzers= | |||
*Get-CimInstance -ClassName Win32_OperatingSystem | | |||
Select-Object -Property NumberOfLicensedUsers,NumberOfUsers,RegisteredUser | |||
<pre> | |||
NumberOfLicensedUsers NumberOfUsers RegisteredUser | |||
--------------------- ------------- -------------- | |||
0 2 xinux | |||
*Get-CimInstance -ClassName | </pre> | ||
=Abrufen des verfügbaren Speicherplatzes= | |||
*Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType=3" | |||
<pre> | <pre> | ||
DeviceID DriveType ProviderName VolumeName Size FreeSpace | |||
-------- --------- ------------ ---------- ---- --------- | |||
--------- ---- | C: 3 53091397632 11874312192 | ||
</pre> | |||
=Abrufen von Informationen zur Anmeldesitzung= | |||
*Get-CimInstance -ClassName Win32_LogonSession | |||
<pre> | |||
LogonId Name LogonType StartTime Status AuthenticationPackage | |||
------- ---- --------- --------- ------ --------------------- | |||
1879112 5 17.11.2021 20:19:55 Negotiate | |||
999 0 17.11.2021 20:12:57 NTLM | |||
997 5 17.11.2021 20:12:58 Negotiate | |||
996 5 17.11.2021 20:12:57 Negotiate | |||
319279 2 17.11.2021 20:13:35 NTLM | |||
1881810 8 17.11.2021 20:20:03 NTLM | |||
61195 2 17.11.2021 20:12:58 Negotiate | |||
61122 2 17.11.2021 20:12:58 Negotiate | |||
37585 2 17.11.2021 20:12:57 Negotiate | |||
37643 2 17.11.2021 20:12:57 Negotiate | |||
</pre> | </pre> | ||
=Anzeigen des Dienststatus= | |||
*Get-CimInstance -ClassName | *Get-CimInstance -ClassName Win32_Service | | ||
Format-Table -Property Status,Name,DisplayName -AutoSize -Wrap | |||
<pre> | <pre> | ||
Status Name DisplayName | |||
------ ---- ----------- | |||
OK AJRouter AllJoyn-Routerdienst | |||
OK ALG Gatewaydienst auf Anwendungsebene | |||
OK AppIDSvc Anwendungsidentität | |||
OK Appinfo Anwendungsinformationen | |||
OK AppMgmt Anwendungsverwaltung | |||
OK AppReadiness App-Vorbereitung | |||
OK AppVClient Microsoft App-V Client | |||
OK AppXSvc AppX-Bereitstellungsdienst (AppXSVC) | |||
OK AssignedAccessManagerSvc AssignedAccessManager-Dienst | |||
OK AudioEndpointBuilder Windows-Audio-Endpunkterstellung | |||
OK Audiosrv Windows-Audio | |||
OK autotimesvc Mobilfunkzeit | |||
OK AxInstSV ActiveX-Installer (AxInstSV) | |||
OK BalloonService BalloonService | |||
OK BDESVC BitLocker-Laufwerkverschlüsselungsdienst | |||
OK BFE Basisfiltermodul | |||
OK BITS Intelligenter Hintergrundübertragungsdienst | |||
</pre> | </pre> | ||
=Quellen= | =Quellen= | ||
*https://docs.microsoft.com/de-de/powershell/scripting/samples/collecting-information-about-computers?view=powershell-7.2 | *https://docs.microsoft.com/de-de/powershell/scripting/samples/collecting-information-about-computers?view=powershell-7.2 | ||
Version vom 17. November 2021, 19:56 Uhr
ComputerInfo
- Allgemein
- Get-ComputerInfo
- Versions Property
- Get-ComputerInfo -Property "*version"
Auflisten von BIOS-Informationen
- Get-CimInstance -ClassName Win32_BIOS
SMBIOSBIOSVersion : rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org Manufacturer : SeaBIOS Name : Default System BIOS SerialNumber : Version : BOCHS - 1
Auflisten von Desktopeinstellungen
- Get-CimInstance -ClassName Win32_Desktop
SettingID Name ScreenSaverActive ScreenSaverSecure ScreenSaverTimeout
--------- ---- ----------------- ----------------- ------------------
NT-AUTORITÄT\SYSTEM False
NT-AUTORITÄT\Lokaler Dienst False
NT-AUTORITÄT\Netzwerkdienst False
TOMWIN\xinux False
TOMWIN\thomas.will False
TOMWIN\Administrator False
.DEFAULT False
Auflisten von Prozessorinformationen
- Get-CimInstance -ClassName Win32_Processor | Select-Object -ExcludeProperty "CIM*"
Get-CimInstance -ClassName Win32_Processor | Select-Object -ExcludeProperty "CIM*"
Auflisten von Informationen zum Computerhersteller und -modell
- Get-CimInstance -ClassName Win32_ComputerSystem
Name PrimaryOwnerName Domain TotalPhysicalMemory Model Manufacturer ---- ---------------- ------ ------------------- ----- ------------ TOMWIN xinux WORKGROUP 8589344768 Standard PC (Q35 +... QEMU
Auflisten installierter Hotfixes
- Get-CimInstance -ClassName Win32_QuickFixEngineering
Source Description HotFixID InstalledBy InstalledOn
------ ----------- -------- ----------- -----------
Update KB5006365 NT-AUTORITÄT\SYSTEM 10.11.2021 00:00:00
Update KB4562830 NT-AUTORITÄT\SYSTEM 21.10.2021 00:00:00
Security Update KB4570334 18.11.2020 00:00:00
Security Update KB4580325 19.11.2020 00:00:00
Security Update KB4586864 19.11.2020 00:00:00
Update KB5005716 NT-AUTORITÄT\SYSTEM 21.10.2021 00:00:00
Security Update KB5007186 NT-AUTORITÄT\SYSTEM 10.11.2021 00:00:00
Update KB5006753 NT-AUTORITÄT\SYSTEM 10.11.2021 00:00:00
Security Update KB5005699 NT-AUTORITÄT\SYSTEM 21.10.2021 00:00:00
Auflisten von Informationen zur Betriebssystemversion
- Get-CimInstance -ClassName Win32_OperatingSystem |
Select-Object -Property BuildNumber,BuildType,OSType,ServicePackMajorVersion,ServicePackMinorVersion
BuildNumber : 19042 BuildType : Multiprocessor Free OSType : 18 ServicePackMajorVersion : 0 ServicePackMinorVersion : 0
Auflisten der lokalen Benutzer und des Besitzers
- Get-CimInstance -ClassName Win32_OperatingSystem |
Select-Object -Property NumberOfLicensedUsers,NumberOfUsers,RegisteredUser
NumberOfLicensedUsers NumberOfUsers RegisteredUser
--------------------- ------------- --------------
0 2 xinux
Abrufen des verfügbaren Speicherplatzes
- Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType=3"
DeviceID DriveType ProviderName VolumeName Size FreeSpace -------- --------- ------------ ---------- ---- --------- C: 3 53091397632 11874312192
Abrufen von Informationen zur Anmeldesitzung
- Get-CimInstance -ClassName Win32_LogonSession
LogonId Name LogonType StartTime Status AuthenticationPackage ------- ---- --------- --------- ------ --------------------- 1879112 5 17.11.2021 20:19:55 Negotiate 999 0 17.11.2021 20:12:57 NTLM 997 5 17.11.2021 20:12:58 Negotiate 996 5 17.11.2021 20:12:57 Negotiate 319279 2 17.11.2021 20:13:35 NTLM 1881810 8 17.11.2021 20:20:03 NTLM 61195 2 17.11.2021 20:12:58 Negotiate 61122 2 17.11.2021 20:12:58 Negotiate 37585 2 17.11.2021 20:12:57 Negotiate 37643 2 17.11.2021 20:12:57 Negotiate
Anzeigen des Dienststatus
- Get-CimInstance -ClassName Win32_Service |
Format-Table -Property Status,Name,DisplayName -AutoSize -Wrap
Status Name DisplayName ------ ---- ----------- OK AJRouter AllJoyn-Routerdienst OK ALG Gatewaydienst auf Anwendungsebene OK AppIDSvc Anwendungsidentität OK Appinfo Anwendungsinformationen OK AppMgmt Anwendungsverwaltung OK AppReadiness App-Vorbereitung OK AppVClient Microsoft App-V Client OK AppXSvc AppX-Bereitstellungsdienst (AppXSVC) OK AssignedAccessManagerSvc AssignedAccessManager-Dienst OK AudioEndpointBuilder Windows-Audio-Endpunkterstellung OK Audiosrv Windows-Audio OK autotimesvc Mobilfunkzeit OK AxInstSV ActiveX-Installer (AxInstSV) OK BalloonService BalloonService OK BDESVC BitLocker-Laufwerkverschlüsselungsdienst OK BFE Basisfiltermodul OK BITS Intelligenter Hintergrundübertragungsdienst