Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PACSAPL Testing Utilities

A collection of PowerShell scripts for managing certificates and taking screenshots on Windows.

Scripts

addcerts.ps1

Adds a single certificate to the Trusted Root Certification Authorities store for the current user.

Usage:

.\addcerts.ps1 -CertPath "C:\path\to\certificate.cer"

Parameters:

  • -CertPath: The full path to the certificate file (.cer) to be added

Example:

.\addcerts.ps1 -CertPath "C:\certificates\mycert.cer"

addcertsindirectory.ps1

Adds all .crt certificate files from a specified directory to the Trusted Root Certification Authorities store for the current user.

Usage:

.\addcertsindirectory.ps1 -CertDir "C:\path\to\certificates"

Parameters:

  • -CertDir: The full path to the directory containing the .crt certificate files

Example:

.\addcertsindirectory.ps1 -CertDir "C:\certificates"

Notes:

  • Only .crt files in the specified directory will be processed
  • The script will continue processing other certificates if one fails
  • Each certificate addition is logged with success or failure status

screenshot.ps1

Takes a screenshot of the primary screen and saves it to the user's Pictures folder with a date-stamped filename.

Usage:

.\screenshot.ps1

Features:

  • Prompts for a base filename
  • Automatically appends the current date (YYYYMMDD format)
  • Automatically increments a counter if a file with the same name already exists
  • Saves screenshots as PNG files

Example Output:

  • First screenshot: my_screenshot-20250210.png
  • If file exists: my_screenshot-20250210-001.png, my_screenshot-20250210-002.png, etc.

Prerequisites

  • Windows PowerShell 5.1 or PowerShell 7+
  • Appropriate execution policy (may need to run Set-ExecutionPolicy)

Execution Policy

If you encounter execution policy errors, you may need to adjust PowerShell's execution policy:

Check current policy:

Get-ExecutionPolicy

Set policy for current user (if needed):

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

Note: The addcertsindirectory.ps1 script includes detailed notes about execution policy management in its header comments.

Author

Jason Goodloe

License

This project is provided as-is for internal use.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages