How to check Remote Server Configuration/Info - Using Powershell

How to check Remote Server Configuration/Info - Using PowerShell


With the help of this powershell script, you will be able to query a remote server and get their 
configuration setting information.

This will help and save lot of time since you dont need to login to any server to check the details.

The server that you are about to query should be firewall friendly, if you are not able to ping the server then you cant query any of the below remote server attributes.

Remote server Info Includes:

  • System Configuration Information
  • Services Information of a remote server
  • Drive Configuration of a remote server
  • Network Configuration of a remote server
  • Installed Hotfixes on a remote server
  • Processor Details of a remote server
  • Installed Application Details on a remote server
  • Administration information of a remote server

Let's begin 

Script

How to check System Configuration Information using Powershell

$path = "$([Environment]::GetFolderPath("Desktop"))\System Config Info.txt"; 
Get-WmiObject -Class Win32_OperatingSystem -ComputerName $d | fl * | fl > $path; 
notepad $path; 

How to check Services Information of a remote server using Powershell

$path = "$([Environment]::GetFolderPath("Desktop"))\Services Info.txt"; 
Get-WmiObject -Class Win32_Service -ComputerName $d | Out-File $path 
notepad $path; 


How to check Drive Configuration of a remote server using Powershell

$path = "$([Environment]::GetFolderPath("Desktop"))\Drive Info.txt";
"Drive information for $env:ComputerName" | out-file  $path -Append; 
Get-WmiObject -Class Win32_LogicalDisk -ComputerName $d | Where-Object { $_.DriveType -ne 5 } | Sort-Object -Property Name | Select-Object Name, VolumeName, VolumeSerialNumber, SerialNumber, FileSystem, Description, VolumeDirty, ` @{ "Label" = "DiskSize(GB)"; "Expression" = { "{0:N}" -f ($_.Size/1GB) -as [float] } }, ` @{ "Label" = "FreeSpace(GB)"; "Expression" = { "{0:N}" -f ($_.FreeSpace/1GB) -as [float] } }, ` @{ "Label" = "%Free"; "Expression" = { "{0:N}" -f ($_.FreeSpace/$_.Size * 100) -as [float] } } | Format-Table  | fl | out-file  $path; 
notepad $path;

How to Check Network Configuration of a remote server using Powershell
$path = "$([Environment]::GetFolderPath("Desktop"))\Network Config Info.txt"; 

$nwINFO = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $d | Where-Object { $_.IPAddress -ne $null } | Select-Object DNSHostName, Description, IPAddress, IpSubnet, DefaultIPGateway, MACAddress, DNSServerSearchOrder | fl > $path; notepad $path; 




How to check Installed Hotfixes of a remote server using Powershell

$path = "$([Environment]::GetFolderPath("Desktop"))\Installed Hotfixes Info.txt";
Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName $d | Out-File $path # -Encoding UTF8 -Append -Width 1000
notepad $path; 


How to check Process details of a remote server using Powershell

$path = "$([Environment]::GetFolderPath("Desktop"))\Processor Info.txt";
Get-WmiObject -Class Win32_Processor -ComputerName  $d  | Select-Object -Property [a-z]* | fL * | fl > $path; 
notepad $path;


How to check Installed Applications details on a remote server using Powershell

$path = "$([Environment]::GetFolderPath("Desktop"))\InstalleApp Info.txt";

Get-WmiObject -Class Win32_Product -ComputerName $d | Sort-Object Name | Select-Object Name, Vendor, Version, InstallDate | Format-Table  | fl > $path;

notepad $path;


How to check Administration Information on a remote server using Powershell


$path = "$([Environment]::GetFolderPath("Desktop"))\Admin Info.txt";

net localgroup administrators | fl > $path;
#new admin info1
Get-WmiObject win32_groupuser -ComputerName $d | Where-Object { $_.groupcomponent -match 'administrators' } |

ForEach-Object { [wmi]$_.partcomponent } | out-file $path -append;
#new admin info2
Get-WmiObject -Class Win32_UserAccount -ComputerName $d | Format-Table | Out-File $path -Append; notepad $path;

Screenshots:









How to Use?

1. Download the RemoteServerInfo tool from the link given below

2. Double on the file to launch it, you need to extract zip before launching

3. Enter the hostname in the text area provided, as shown in the screenshot

4. Once you have entered the hostname, then select appropriate options from the drop-down
     menu that you want to query 

5. Click on 'Initialise' to get the results

Bydefault  the result will be saved in your desktop.

Note: Entered hostname should be able to respond to your ping request. It should be firewall friendly to return results for your query. 

Download



Thanks for Downloading.

For any query, please comment down below.

#Share this project with your friends.

#This is only for Educational Purpose

#If you like the post, then forget to share. 

#You can make use of BuyNow button for Donation purpose





Previous
Next Post »
0 Comments