Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Информация о ПК
- Write-Output User
- $PCName = @{
- Name = "Computer name"
- Expression={$_.Name}
- }
- $Domain = @{
- Name = "Domain"
- Expression={$_.Domain}
- }
- $UserName = @{
- Name = "User Name"
- Expression={$_.PrimaryOwnerName}
- }
- (Get-CimInstance –ClassName CIM_ComputerSystem | Select-Object $PCName, $Domain, $UserName | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Host "Operating System"
- $OS = @{
- Name = "Name"
- Expression={$_.Caption}
- }
- $InstallDate = @{
- Name = "Install Date"
- Expression={$_.InstallDate}
- }
- $Version = @{
- Name = "Version"
- Expression = {$_.Version}
- }
- $Arch = @{
- Name = "Architecture"
- Expression = {$_.OSArchitecture}
- }
- (Get-CimInstance -ClassName CIM_OperatingSystem | Select-Object $OS, $InstallDate, $Version, $Arch | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output BIOS
- $Version = @{
- Name = "Version"
- Expression = {$_.Name}
- }
- (Get-CimInstance -ClassName CIM_BIOSElement | Select-Object Manufacturer, $Version | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output Motherboard
- (Get-CimInstance -ClassName Win32_BaseBoard | Select-Object Manufacturer, Product | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output CPU
- $Cores = @{
- Name = "Cores"
- Expression = {$_.NumberOfCores}
- }
- $L3CacheSize = @{
- Name = "L3, MB"
- Expression = {$_.L3CacheSize / 1024}
- }
- $Threads = @{
- Name = "Threads"
- Expression = {$_.NumberOfLogicalProcessors}
- }
- (Get-CimInstance -ClassName CIM_Processor | Select-Object Name, $Cores, $L3CacheSize, $Threads | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output RAM
- $Speed = @{
- Name = "Speed, MHz"
- Expression = {$_.Configuredclockspeed}
- }
- $Capacity = @{
- Name = "Capacity, GB"
- Expression = {$_.Capacity / 1GB}
- }
- (Get-CimInstance -ClassName CIM_PhysicalMemory | Select-Object Manufacturer, PartNumber, $Speed, $Capacity | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output "Physical disks"
- $Model = @{
- Name = "Model"
- Expression = {$_.FriendlyName}
- }
- $MediaType = @{
- Name = "Drive type"
- Expression = {$_.MediaType}
- }
- $Size = @{
- Name = "Size, GB"
- Expression = {[math]::round($_.Size / 1GB, 2)}
- }
- $BusType = @{
- Name = "Bus type"
- Expression = {$_.BusType}
- }
- (Get-PhysicalDisk | Select-Object $Model, $MediaType, $BusType, $Size | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output "Logical disks"
- Enum DriveType {
- RemovableDrive = 2
- HardDrive = 3
- NetworkDrive = 4
- }
- $Name = @{
- Name = "Name"
- Expression = {$_.DeviceID}
- }
- $Type = @{
- Name = "Drive Type"
- Expression = {[enum]::GetName([DriveType],$_.DriveType)}
- }
- $Path = @{
- Name = "Path"
- Expression = {$_.ProviderName}
- }
- $Size = @{
- Name = "Size, GB"
- Expression = {[math]::round($_.Size/1GB, 2)}
- }
- (Get-CimInstance -ClassName CIM_LogicalDisk | Where-Object -FilterScript {$_.DriveType} | Select-Object $Name, $Type, $Path, VolumeName, $Size | Format-Table | Out-String).Trim()
- Write-Output ""
- Write-Output "Video сontrollers"
- (Get-CimInstance -ClassName CIM_VideoController).Caption
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement