Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This powershell script gatters computer information
  2.  
  3. $uncServer = "\\192.168.50.2"
  4. $uncFullPath = "$uncServer\Bitlocker_Check"
  5.  
  6. $computerinfo = get-wmiobject Win32_ComputerSystem
  7. $computerBIOS = get-wmiobject Win32_BIOS
  8. $computerOS = get-wmiobject Win32_OperatingSystem
  9. $CPU_Type = get-wmiobject win32_Processor
  10. $tpmP = get-tpm
  11. $Networkinfo = Get-NetAdapter -Name "*" -Physical
  12.  
  13. $outputcomputername = "System Information for: " + $computerinfo.Name
  14. $outputloggedinuser = "User logged In: " + $computerinfo.UserName
  15. $outputManufacturer = "Manufacturer: " + $computerinfo.Manufacturer
  16. $outputModel = "Model: " + $computerinfo.Model
  17. $outputSN = "Serial Number: " + $computerBIOS.SerialNumber
  18. $outputBIOS = "BIOS Version: " + $computerBIOS.Version
  19. $outputCPU = "CPU: " + $CPU_Type.Name
  20. $outputmemory = "Memory (GB): " + $computerinfo.TotalPhysicalMemory/1gb
  21. $outputOS = "OS: " + $computerOS.caption + ", Service Pack: " + $computerOS.ServicePackMajorVersion + ", Build: " + $computerOS.BuildNumber
  22. $outputlastreboot = "Last Reboot: " + $computerinfo.ConvertToDateTime($computerOS.LastBootUpTime)
  23.  
  24. #Export to TXT-file
  25. Out-File -FilePath $uncFullPath\"$env:computername.txt" -InputObject $outputcomputername,$outputloggedinuser,$outputManufacturer,$outputModel,$outputSN,$outputBIOS,$outputCPU,$outputmemory,$tpmP,$networkinfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement