Skip to content

Commit a91ea8f

Browse files
Merge pull request #5455 from MicrosoftEdge/user/chetanpandey/improveDiagnosticScript
[Diagnostic] Improve script and Execution Policy changes to run the script
2 parents 8dc84e3 + 6fa967b commit a91ea8f

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
26.5 KB
Loading

diagnostics/resources/log_collection_script.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ param(
1313
Add-Type -AssemblyName System.Windows.Forms
1414
Add-Type -AssemblyName System.Drawing
1515
Add-Type -AssemblyName System.IO.Compression
16+
Add-Type -AssemblyName System.IO.Compression.FileSystem
1617

1718
# Variables to hold file paths for zipping
1819
$OutPath = ""

diagnostics/script.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,17 @@ To specify a different output directory for the ZIP file, provide the `ZipPath`
3737
.\log_collection_script.ps1 -ZipPath <folder-path>
3838
3939
```
40+
41+
**Troubleshooting**
42+
43+
If you encounter an execution policy error when running the script:
44+
![alt text](resources/execution-policy.png)
45+
46+
This error indicates that the current execution policy on your system is preventing the script from running.
47+
48+
1. Set the execution policy to Bypass for the current powershell session:
49+
```shell
50+
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
51+
```
52+
53+
2. Run the log collection script and complete the diagnostic process.

0 commit comments

Comments
 (0)