Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # code from http://aperturescience.su
- "======================================================================="
- " Basic Information"
- "======================================================================="
- $OSWIMI = Get-WmiObject Win32_OperatingSystem
- $COMPWMI = Get-WmiObject Win32_Computersystem
- "Hostname: $($ENV:Computername)"
- "Operating System: $($OSWIMI.Caption)"
- "CPU: $((Get-WmiObject Win32_Processor).Caption)"
- "Memory: $($OSWIMI.TotalVisibleMemorySize) kb"
- "Country Code: $($OSWIMI.CountryCode)"
- "OS Arch: $($OSWIMI.OSArchitecture)"
- if ($COMPWMI.Workgroup -eq $null)
- {
- "Is a domain member"
- "Domain name is: $($COMPWMI.Domain)"
- }
- else
- {
- "Is not a member of domain"
- "Workgroup name is: $($COMPWMI.Workgroup)"
- }
- "======================================================================="
- " Internal/Local IP"
- "======================================================================="
- Get-NetIPAddress | ft interfacealias, ipaddress
- "======================================================================="
- " External IP"
- "======================================================================="
- $ipcheckurl = "http://icanhazip.com/"
- $wc = New-Object Net.WebClient
- $wc.headers["UserAgent"] = "Mozilla/5.0 (Windows NT 6.2; WOW64)"
- $wc.downloadstring($ipcheckurl)
- # code from http://aperturescience.su
Advertisement
Add Comment
Please, Sign In to add comment