Skip to content

Commit

Permalink
Merge pull request #3999 from zowe/anax-v3.0-troubleshoot-powershell-cli
Browse files Browse the repository at this point in the history
adding powershell troubleshoot doc
  • Loading branch information
anaxceron authored Nov 15, 2024
2 parents f62beb4 + 35a90a4 commit e10387b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions docs/troubleshoot/cli/known-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,32 @@ When the `zowe zos-files search data-sets` command is issued with the `--mainfra
**Solution:**

Issue the `zowe files search ds` command without the `--mainframe-search` option. This returns results that include data sets in binary format.

## Error message with PowerShell scripts

**Valid on Windows**

**Symptom:**

PowerShell users on Windows can encounter an error when they try to run Zowe CLI with certain execution policies in place.

Example of an error message:

```
PS C:\> zowe
zowe : File C:\Users\user\AppData\Roaming\npm\zowe.ps1 cannot be loaded because running scripts is disabled on this
system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ zowe
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
```

**Solutions:**

- Update developer settings in Windows to enable running local scripts without signing:

![PowerShell setting](../../images/troubleshoot/cli/PowerShell_developer_setting.png)

- Run PowerShell as an administrator and use the `Set-ExecutionPolicy` command to change the execution policy to a less-restrictive setting, for example: `Set-ExecutionPolicy RemoteSigned -scope CurrentUser`.

0 comments on commit e10387b

Please # to comment.