Skip to content

Cannot validate argument on parameter 'Session'. #188

@infosecwatchman

Description

@infosecwatchman

I ran

PS C:\Tools\Kansa-master> ls -r *.ps1 | Unblock-File
PS C:\Tools\Kansa-master> Set-ExecutionPolicy Unrestricted
PS C:\Tools> streams -sd .\Kansa-master\ #I have SysInternals on my Path
PS C:\Tools\Kansa-master> .\kansa.ps1 -Target $env:COMPUTERNAME -ModulePath .\Modules -Verbose

But it errors out saying:

VERBOSE: Found .\Modules\Modules.conf.
VERBOSE: Running modules:
Get-PrefetchListing
Get-WMIRecentApps
Get-Netstat
Get-DNSCache
Get-ProcsWMI
Get-LogUserAssist
Get-SvcFail
Get-SvcTrigs
Get-WMIEvtFilter
Get-WMIFltConBind
Get-WMIEvtConsumer
Get-PSProfiles
Get-SchedTasks
Get-File
Get-LocalAdmins
VERBOSE: Found logging.conf
Caught: Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
Script completed with warnings or errors. See C:\Tools\Kansa-master\Output_20190313154552\Error.Log for details.

Here are the contents of the error log.

Connecting to remote server **** failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic.
Exit-Script function was passed an error, this may be a duplicate that wasn't previously cleared, or Kansa.ps1 has crashed.
Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions