Skip to content

Conversation

@JamesKehr
Copy link

  • Created a more robust downloader (Get-WebFile).

    • Uses curl.exe, built-in to newer Win11 builds, to download files when the command is found.
    • Fall back to Invoke-WebRequest when curl.exe is not present or fails.
    • Fall back to Start-BitsTransfer when curl and iwr fail.
  • Created a unified tracing solution: Start-SdnDebugTrace.ps1

    • Start-SdnDebugTrace.ps1 downloads all dependent files. Prompts with URLs and files needed when they cannot be downloaded.
    • Parameters:
      • Scenario - Selects the profile to use. Default: Normal
        • Options: Normal (default), Lite, Full (see below)
      • EtlFile - Path and filename to save logging. The file extension must be .etl. Default: C:\server.etl
      • snapLen - How many bytes of each packet will captured. Default: 256
      • maxFileSize - Size, in MB, of the ETL file. Default: 500
      • LogPath - Path, no filename, to save the logging file(s). Default:
      • NoPrompt - Starts tracing but does not collect logs (collectlogs.ps1) and does not prompt to press 'q' to stop.
      • NoPackets - Does not collect network packets.
      • NoLogs - Does not run collectlogs.ps1.

Supporting files:

  • lib
    • This dir contains:
    • libLogging.psm1 - a logging solution that logs events in the script that can be uploaded for troubleshooting the script.
    • libFunctions.psm1 - common functions go here.
    • libClass.psm1 - contains class definitions
  • profiles
    • Custom capture profiles can be created by adding a profile file and then adding that profile to Start-SdnDebugTrace.ps1.
    • This adds some flexibility in creating trace definitions without writing a new script each time the providers need to be updated.
    • The rules:
      • Must be a valid JSON file.
      • Must start with hns_
      • Must contain the same properties as other hns_ files.
      • The scenario name, param section of Start-SdnDebugTrace.ps1, must match the filename text between "hns_" and ".json".
    • hns_lite.json - Provider definitions copied from starthnstrace.ps1
    • hns_normal.json - Provider definitions copied from startpacketcapture.ps1
    • hns_full.json - Provider definitions copied from startpacketcapture.ps1, plus NETIO and WFP providers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant