Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $SystemInfo = [ordered]@{}
- $CIM_PageFileUsage = Get-CimInstance -ClassName Win32_PageFileUsage
- $SystemInfo.Add('PageFile_Name', $CIM_PageFileUsage.Name)
- $SystemInfo.Add('PageFile_WhenCreated', $CIM_PageFileUsage.InstallDate)
- $SystemInfo.Add('PageFile_IsTemp', $CIM_PageFileUsage.TempPageFile)
- # the page file size info is in MB, not Bytes
- $SystemInfo.Add('PageFile_Size_GB', '{0:N3}' -f ($CIM_PageFileUsage.AllocatedBaseSize / 1KB))
- $SystemInfo.Add('PageFile_Size_PeakUsage_GB', '{0:N3}' -f ($CIM_PageFileUsage.PeakUsage / 1KB))
- $SystemInfo.Add('PageFile_Size_CurrentUsage_GB', '{0:N3}' -f ($CIM_PageFileUsage.CurrentUsage / 1KB))
- $SystemInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement