mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-16 14:47:49 +08:00
save cmder_diag.* output to a file
This commit is contained in:
95
vendor/bin/cmder_diag.ps1
vendored
95
vendor/bin/cmder_diag.ps1
vendored
@ -1,45 +1,64 @@
|
||||
write-host ------------------------------------
|
||||
write-host get-childitem "$env:CMDER_ROOT"
|
||||
write-host ------------------------------------
|
||||
get-childitem "$env:CMDER_ROOT"
|
||||
if (test-path $env:temp/cmder_diag_ps.log) {
|
||||
remove-item $env:temp/cmder_diag_ps.log
|
||||
}
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host get-childitem "$env:CMDER_ROOT/vendor"
|
||||
write-host ------------------------------------
|
||||
get-childitem "$env:CMDER_ROOT/vendor"
|
||||
$cmder_diag = {
|
||||
""
|
||||
"------------------------------------"
|
||||
"get-childitem env:"
|
||||
"------------------------------------"
|
||||
get-childitem env: | ft -autosize -wrap 2>&1
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host get-childitem -s "$env:CMDER_ROOT/bin"
|
||||
write-host ------------------------------------
|
||||
get-childitem -s "$env:CMDER_ROOT/bin"
|
||||
""
|
||||
"------------------------------------"
|
||||
"get-command git -all -ErrorAction SilentlyContinue"
|
||||
"------------------------------------"
|
||||
get-command git -all -ErrorAction SilentlyContinue
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host get-childitem -s "$env:CMDER_ROOT/config"
|
||||
write-host ------------------------------------
|
||||
get-childitem -s "$env:CMDER_ROOT/config"
|
||||
""
|
||||
"------------------------------------"
|
||||
"get-command clink -all -ErrorAction SilentlyContinue"
|
||||
"------------------------------------"
|
||||
get-command clink -all -ErrorAction SilentlyContinue
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host get-childitem env:
|
||||
write-host ------------------------------------
|
||||
get-childitem env: |ft -autosize -wrap
|
||||
""
|
||||
"------------------------------------"
|
||||
"systeminfo"
|
||||
"------------------------------------"
|
||||
systeminfo 2>&1
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host get-command git
|
||||
write-host ------------------------------------
|
||||
get-command git
|
||||
"------------------------------------"
|
||||
"get-childitem '$env:CMDER_ROOT'"
|
||||
"------------------------------------"
|
||||
get-childitem "$env:CMDER_ROOT" |ft LastWriteTime,mode,length,FullName
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host systeminfo
|
||||
write-host ------------------------------------
|
||||
systeminfo
|
||||
""
|
||||
"------------------------------------"
|
||||
"get-childitem '$env:CMDER_ROOT/vendor'"
|
||||
"------------------------------------"
|
||||
get-childitem "$env:CMDER_ROOT/vendor" |ft LastWriteTime,mode,length,FullName
|
||||
|
||||
write-host ''
|
||||
write-host ------------------------------------
|
||||
write-host Make sure you sanitize this output of private data prior to posting it online for review by the CMDER Team!
|
||||
write-host ------------------------------------
|
||||
""
|
||||
"------------------------------------"
|
||||
"get-childitem -s '$env:CMDER_ROOT/bin'"
|
||||
"------------------------------------"
|
||||
get-childitem -s "$env:CMDER_ROOT/bin" |ft LastWriteTime,mode,length,FullName
|
||||
|
||||
""
|
||||
"------------------------------------"
|
||||
"get-childitem -s '$env:CMDER_ROOT/config'"
|
||||
"------------------------------------"
|
||||
get-childitem -s "$env:CMDER_ROOT/config" |ft LastWriteTime,mode,length,FullName
|
||||
|
||||
""
|
||||
"------------------------------------"
|
||||
"Make sure you sanitize this output of private data prior to posting it online for review by the CMDER Team!"
|
||||
"------------------------------------"
|
||||
}
|
||||
|
||||
& $cmder_diag | out-file -filePath $env:temp/cmder_diag_ps.log
|
||||
|
||||
get-content "$env:temp/cmder_diag_ps.log"
|
||||
|
||||
write-host ""
|
||||
write-host Above output was saved in "$env:temp/cmder_diag_ps.log"
|
||||
|
Reference in New Issue
Block a user