davehull / Kansa

A Powershell incident response framework
Apache License 2.0
1.56k stars 266 forks source link

Error.log - Cannot overwrite variable #210

Open gib-sec opened 4 years ago

gib-sec commented 4 years ago

Hi,

I am receiving the following errors in the error.log when using kansa. Can you help please?

Get-WMIRecentApps reports error on XXX: "Invalid namespace Cannot overwrite variable CMPNAMELENGTH because it is read-only or constant. Cannot overwrite variable SEPARATOR because it is read-only or constant. Cannot overwrite variable EXTLENGTH because it is read-only or constant. Cannot overwrite variable MAXPATH because it is read-only or constant." Get-Netstat reports error on XXX: "Cannot overwrite variable CMPNAMELENGTH because it is read-only or constant. Cannot overwrite variable SEPARATOR because it is read-only or constant. Cannot overwrite variable EXTLENGTH because it is read-only or constant. Cannot overwrite variable MAXPATH because it is read-only or constant." Get-DNSCache reports error on XXX: "Cannot overwrite variable CMPNAMELENGTH because it is read-only or constant. Cannot overwrite variable SEPARATOR because it is read-only or constant. Cannot overwrite variable EXTLENGTH because it is read-only or constant. Cannot overwrite variable MAXPATH because it is read-only or constant." Get-ProcsWMI reports error on XXX: "Cannot overwrite variable CMPNAMELENGTH because it is read-only or constant. Cannot overwrite variable SEPARATOR because it is read-only or constant. Cannot overwrite variable EXTLENGTH because it is read-only or constant. Cannot overwrite variable MAXPATH because it is read-only or constant." Exit-Script function was passed an error, this may be a duplicate that wasn't previously cleared, or Kansa.ps1 has crashed. You cannot call a method on a null-valued expression. Cannot overwrite variable CMPNAMELENGTH because it is read-only or constant. Cannot overwrite variable SEPARATOR because it is read-only or constant. Cannot overwrite variable EXTLENGTH because it is read-only or constant. Cannot overwrite variable MAXPATH because it is read-only or constant.

Bapped commented 4 years ago

Having the same issue

ghost commented 4 years ago

Submitted a pull request that fixes this issue. #211