Upload files to "Microsoft"

This commit is contained in:
Timur 2024-06-26 07:38:51 +00:00
parent 6a099d1ce8
commit 8ac48f01fa

View file

@ -0,0 +1,47 @@
# Script by Timur@0x01337.com
# Date: 2023-11-24
<#
.DESCRIPTION
Displays the detailed information about the hardware and operating system.
.PARAMETER help
Displays a detailed usage description of this script.
.EXAMPLE
PS> .\Get-System-Information.ps1
.EXAMPLE
PS> .\Get-System-Information.ps1 -help
#>
# Getting command line parameters
param (
[parameter(Mandatory = $false)][switch]$help
)
# Writing help message
if ($help) {
get-help $MyInvocation.MyCommand.Path -Full
exit 0
}
$command = "systeminfo"
Write-Host "Running $command"
try {
$process = Start-Process -Wait -PassThru -NoNewWindow -FilePath $command
}
catch {
Write-Error "$_, exit code: $($process.ExitCode)"
exit 1
}
if (!$process -or $process.ExitCode -ne 0) {
Write-Error "$command failed, exit code: $($process.ExitCode)"
exit 1
}
Write-Host "$command finished, exit code: $($process.ExitCode)"
exit 0