Sign inSign up

natecbh/m365-pac

By natecbh

•Updated about 1 year ago

This container generates a Microsoft 365 PAC file using the Get-PacFile⁠ PowerShell script.

Image
0

122

natecbh/m365-pac repository overview

⁠🚀 Instant M365 Get-PacFile Script Executor

This container instantly generates a Microsoft 365 PAC file using the Get-PacFile⁠ PowerShell script.


⁠✅ Supported Environment Variables

  • All parameters supported by the Get-PacFile script.
  • pause — If set (e.g., true), the container pauses after script execution and enters an interactive PowerShell shell.

⁠🧪 Example Usage

# Run with interactive shell after execution
docker run --rm -it \
  -e defaultproxysettings="PROXY 10.10.10.100:8080" \
  -e pause=true \
  natecbh/m365-pac:alpine-3.20

# Run with lowercase hostnames and PAC type 1, store result in volume
docker run --rm \
  -v myvolume:/app/result \
  -e type=1 \
  -e lowercase=true \
  natecbh/m365-pac:alpine-3.20

Generates a PAC file optimized for Microsoft 365 connectivity.


⁠📄 DESCRIPTION

This script accesses up-to-date information to generate a PAC file that prioritizes Microsoft 365 URLs for improved connectivity.
It supports different output formats depending on how traffic should be routed.


⁠⚙️ PARAMETERS
ParameterDescription
InstanceSpecifies the Microsoft 365 service instance (e.g., Worldwide, China, Germany, etc.).
ClientRequestIdA GUID used when querying the Microsoft 365 endpoint web service.
DirectProxySettingsProxy settings for priority (Optimize / Allow) traffic.
DefaultProxySettingsProxy settings for non-priority traffic.
TypeDefines routing behavior:
• 1: Sends Optimize traffic directly.
• 2: Sends Optimize and Allow traffic directly.
LowercaseIf set, hostnames in the PAC file are transformed to lowercase for consistent matching.
TenantNameReplaces wildcard tenant URLs in the PAC file.
ServiceAreasFilters endpoints based on Microsoft 365 service areas (e.g., SharePoint, Skype, etc.).
FilePathThe file path to which the generated PAC content is saved.

Tag summary

Content type

Image

Digest

sha256:d8612c90d…

Size

83 MB

Last updated

about 1 year ago

docker pull natecbh/m365-pac:alpine-3.20