Code and tests

Check the PowerShell module's code or tests directly to understand commands and their working syntax.

Check the code directly

  1. Locate its file on your disk and check the PowerShell code directly.

    Get-Module AkamaiPowershell | fl
    
    Name              : AkamaiPowershell
    Path              : ~/powershell/Modules/AkamaiPowershell/1.8.0/AkamaiPowershell.psm1
    Description       : Cmdlets to manage Akamai {OPEN} APIs
    ModuleType        : Script
    Version           : 1.8.0
    PreRelease        : 
    NestedModules     : {}
    ExportedFunctions : {Acknowledge-SiteShieldMapByID, Activate-APIEndpointVersion, Activate-AppSecConfiguration, Activate-AppSecConfigurationVersion…}
    ExportedCmdlets   : 
    ExportedVariables : 
    ExportedAliases   : {Get-AccessKeys, Get-AccessKeyVersions, Get-AllProperties, Get-AMDDataStores…}
    
  2. Navigate to the directory given in the response's Path attribute in a shell or Terminal instance or your code editor.

  3. Open a subdirectory for an API service. Each file within the subdirectory details a single command and contains its required parameters and expected types, ValidateSets to limit the input to a given list of options, and ParameterSets to denote mutually exclusive parameters.

Check existing tests

You can determine a command's working syntax by looking at its unit test. All tests are located in the /pester directory.

Most text editors will allow searching for a string across an entire directory, so if you find yourself in a position where you can't quite figure out how to run a given command, try searching for it across the pester directory or the whole module.