Skripta - informacije o računalima na mreži

poruka: 4
|
čitano: 5.048
|
moderatori: Lazarus Long, vincimus
1
+/- sve poruke
ravni prikaz
starije poruke gore
13 godina
offline
Skripta - informacije o računalima na mreži

Pozdrav,

 

da li ima netko neku skriptu koja bi napravila izvještaj o računalima na mreži.

Npr. da ima podatke o CPu, memoriji, ime računala, možda godište

 

hvala

Moj PC  
0 0 hvala 0
13 godina
offline
Skripta - informacije o računalima na mreži

Uspio sam nešto pronaci(powershell):

 

# Exports Local System Information to CSV

# Run this PowerShelll script at log on to collect PC information to a CSV file on a network share

# Thom McKiernan 28/08/2014

$ArrComputers = "komp-01", "komp-02"

#Specify the list of PC names in the line above. "." means local system

Clear-Host

foreach ($Computer in $ArrComputers)

{

$computerSystem = get-wmiobject Win32_ComputerSystem -Computer

$Computer $computerBIOS = get-wmiobject Win32_BIOS -Computer

$Computer $computerOS = get-wmiobject Win32_OperatingSystem -Computer

$Computer $computerCPU = get-wmiobject Win32_Processor -Computer

$Computer $computerHDD = Get-WmiObject Win32_LogicalDisk -ComputerName

$Computer -Filter drivetype=3

write-host "System Information for: "$computerSystem.Name -BackgroundColor DarkCyan

"-------------------------------------------------------"

"Manufacturer: " + $computerSystem.Manufacturer

"Model: " + $computerSystem.Model

"Serial Number: " + $computerBIOS.SerialNumber

"CPU: " + $computerCPU.Name

"HDD Capacity: " + "{0:N2}" -f ($computerHDD.Size/1GB) + "GB"

"HDD Space: " + "{0:P2}" -f ($computerHDD.FreeSpace/$computerHDD.Size) + " Free (" + "{0:N2}" -f ($computerHDD.FreeSpace/1GB) + "GB)"

"RAM: " + "{0:N2}" -f ($computerSystem.TotalPhysicalMemory/1GB) + "GB"

"Operating System: " + $computerOS.caption + ", Service Pack: " + $computerOS.ServicePackMajorVersion

"User logged In: " + $computerSystem.UserName

"Last Reboot: " + $computerOS.ConvertToDateTime($computerOS.LastBootUpTime) ""

"-------------------------------------------------------"

#Export the fields you want from above in the specified order

$csvObject | Select PCName, Ram, OS | Export-Csv 'system-info.csv' -NoTypeInformation -Append

}

# Open CSV file for review (leave this line out when deploying)

notepad system-info.csv

 

EDIT: ne radi mi export u CSV

 EDIT2: # javi i grešku oko metode

Method invocation failed because [System.Object[]] does not contain a method named 'op_Division'.
At D:\skripta - Copy.ps1:13 char:1
+ $csvObject = New-Object PSObject -property @{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (op_Division:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

Poruka je uređivana zadnji put sri 2.9.2015 14:59 (Darko1983).
Moj PC  
0 0 hvala 0
15 godina
neaktivan
offline
Re: Skripta - informacije o računalima na mreži
Probaj OCS inventory ako nisi... opensource je i korisno dapace...

mozes ga ukoponirat uz GLPI...

u svakom slucaju trebalo bi ti bili ok za veci broj racunala.

lp.
The finding of threats to security by a security office is totally predictable, and hence the finding is totally worthless.
8 godina
neaktivan
offline
Re: Skripta - informacije o računalima na mreži
1
Nova poruka
E-mail:
Lozinka:
 
vrh stranice