- Unblock the PS1 File
You have two options to unblock the PS1 file.
- Using PowerShell
Open PowerShell.
Run the following command, replacing C:\Path\To\Script.ps1 with the actual path to the PS1
file you want to unblock:
Unblock-File -Path "C:\Path\To\Script.ps1"
- Using File Properties
Right-click on the PS1 file and select Properties
In the Properties window, click on the General tab.
Click on the Unblock button next to Security.
Click OK to save the changes.
- Set Execution Policy
Open PowerShell.
Run the following command to set the execution policy:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
Run the Setup Script
Open PowerShell as an administrator.
Navigate to the directory containing the script.
Execute the following command to run the setup script:
.\windows.ps1
Run the Main Script
After the setup script completes successfully, run the main script with the following command:
.\windows_run.ps1 docker_image_name format
Replace docker_image_name with the name of your Docker image.
Replace format with one of the following formats:
- spdx-json
- cyclonedx-json
Follow the instructions to upload the generated JSON file to Cytex