| 
									
										
										
										
											2023-12-12 16:39:28 +03:00
										 |  |  | function Get-MemorySlots { | 
					
						
							| 
									
										
										
										
											2024-01-29 23:41:19 +03:00
										 |  |  |     $Memory = Get-CimInstance Win32_PhysicalMemory | | 
					
						
							|  |  |  |     Select-Object Manufacturer, | 
					
						
							|  |  |  |     PartNumber, | 
					
						
							|  |  |  |     ConfiguredClockSpeed, | 
					
						
							|  |  |  |     @{Label="Memory"; Expression={[string]($_.Capacity/1Mb)}}, | 
					
						
							|  |  |  |     Tag,DeviceLocator, | 
					
						
							|  |  |  |     BankLabel | 
					
						
							| 
									
										
										
										
											2023-12-12 16:39:28 +03:00
										 |  |  |     $CollectionMemory = New-Object System.Collections.Generic.List[System.Object] | 
					
						
							|  |  |  |     $Memory | ForEach-Object { | 
					
						
							|  |  |  |         $CollectionMemory.Add([PSCustomObject]@{ | 
					
						
							|  |  |  |             Tag     = $_.Tag | 
					
						
							|  |  |  |             Model   = [String]$_.ConfiguredClockSpeed+" Mhz "+$_.Manufacturer+" "+$_.PartNumber | 
					
						
							|  |  |  |             Size    = [string]($_.Memory)+" Mb" | 
					
						
							|  |  |  |             Device  = $_.DeviceLocator | 
					
						
							|  |  |  |             Bank    = $_.BankLabel | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     $CollectionMemory | 
					
						
							|  |  |  | } |