-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
196 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
********************** | ||
Windows PowerShell transcript start | ||
Start time: 20171214173335 | ||
Username: SOLEM\Administrator | ||
RunAs User: SOLEM\Administrator | ||
Machine: SOLEM-AD (Microsoft Windows NT 10.0.14393.0) | ||
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command & 'C:\Users\Administrator\.vscode\extensions\ms-vscode.powershell-1.5.1\scripts\Start-EditorServices.ps1' -EditorServicesVersion '1.5.1' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.5.1' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\Administrator\.vscode\extensions\ms-vscode.powershell-1.5.1\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'C:\Users\Administrator\.vscode\extensions\ms-vscode.powershell-1.5.1\logs\1513268506-d086db26-eef4-40f4-ac33-9377c61a6ed91513268496001\EditorServices.log' -SessionDetailsPath 'C:\Users\Administrator\.vscode\extensions\ms-vscode.powershell-1.5.1\sessions\PSES-VSCode-4716-858453' -FeatureFlags @() | ||
Process ID: 6884 | ||
PSVersion: 5.1.14393.206 | ||
PSEdition: Desktop | ||
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.206 | ||
BuildVersion: 10.0.14393.206 | ||
CLRVersion: 4.0.30319.42000 | ||
WSManStackVersion: 3.0 | ||
PSRemotingProtocolVersion: 2.3 | ||
SerializationVersion: 1.1.0.1 | ||
********************** | ||
Transcript started, output file is .\ComputerInformation.txt | ||
System Information for: SOLEM-AD | ||
------------------------------------------------------- | ||
Manufacturer: Gigabyte Technology Co., Ltd. | ||
Model: H67MA-USB3-B3 | ||
Serial Number: | ||
CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz | ||
HDD C: | ||
HDD Capacity: 2 047,51GB | ||
HDD Space: 99,08 % Free (2 028,62GB) | ||
HDD E: | ||
HDD Capacity: 3 725,90GB | ||
HDD Space: 99,61 % Free (3 711,30GB) | ||
RAM: 31,98GB | ||
Operating System: Microsoft Windows Server 2016 Datacenter, Service Pack: 0 | ||
User logged In: | ||
Last Reboot: 12/14/2017 16:47:46 | ||
|
||
------------------------------------------------------- | ||
********************** | ||
Windows PowerShell transcript end | ||
End time: 20171214173338 | ||
********************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Remote System Information | ||
# Shows hardware and OS details from a list of PCs | ||
# Thom McKiernan 22/08/2014 | ||
# Modified Sivert Solem 17/10/2017 | ||
|
||
$transcriptPath = ".\ComputerInformation.txt" | ||
|
||
Start-Transcript $transcriptPath -force | ||
|
||
$ArrComputers = Read-Host "Specify the list of PC names. '.' 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 | ||
if ($computerCPU.Length -gt 1) { | ||
foreach ($CPU in $computerCPU) { | ||
"CPUID: " + $CPU.DeviceID | ||
"CPU: " + $CPU.Name | ||
} | ||
} | ||
else { | ||
"CPU: " + $computerCPU.Name | ||
} | ||
if ($computerHDD.Length -gt 1) { | ||
foreach ($HDD in $computerHDD) { | ||
"HDD " + $HDD.DeviceID | ||
"HDD Capacity: " + "{0:N2}" -f ($HDD.Size / 1GB) + "GB" | ||
"HDD Space: " + "{0:P2}" -f ($HDD.FreeSpace / $HDD.Size) + " Free (" + "{0:N2}" -f ($HDD.FreeSpace / 1GB) + "GB)" | ||
} | ||
} | ||
else { | ||
"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) | ||
"" | ||
"-------------------------------------------------------" | ||
} | ||
Stop-Transcript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
workflow Get-EventLogEntries { | ||
$lognames = @("Application", "Security", "System") | ||
foreach -parallel ($log in $lognames) { | ||
Get-EventLog -LogName $log -Newest 10 | | ||
Add-Member -NotePropertyName LogName -NotePropertyValue $log -PassThru | | ||
Select-Object -Property Index, TimeGenerated, LogName, EntryType, Source, InstanceId, Message | ||
} | ||
} |