From discovery to your first run

Get started with Community Script Samples

A useful script can save hours. Start with a scenario someone has already solved, understand how it works, and adapt it to your environment.

1. Find the task you want to automate

Open the gallery and search for a task or command, such as a site inventory, sharing links, or Get-PnPSite. Use the product buttons and tool, scenario, and contributor filters together to narrow the results.

Samples cover SharePoint, Microsoft Graph, Teams, Microsoft Copilot, Power Platform, Azure, and more. Open a sample to see its purpose, authors, prerequisites, and script implementations.

2. Choose your tool

Many samples show the same task using different tools. Select the matching tab and read the complete instructions before copying any code.

Tool Installation and documentation
PnP PowerShell Get started with PnP PowerShell
CLI for Microsoft 365 Get started with the CLI
Microsoft Graph PowerShell Install and get started
SharePoint Online Management Shell Connect to SharePoint Online
Azure CLI Install the Azure CLI
Power Apps PowerShell Power Platform PowerShell guidance
Microsoft Teams PowerShell Teams PowerShell overview

Use the sample's tested versions as context, not a guarantee of compatibility with every release. Check the linked tool documentation for current installation and authentication instructions.

3. Review, adapt, and test

  • Read the whole README and script, including permissions, dependencies, and any warnings.
  • Replace example URLs, IDs, file paths, and other placeholders with appropriate values. Never paste credentials into shared code.
  • Use only the permissions the task needs. Review how authentication works for your chosen tool.
  • Test against non-production data first. Review any operation that changes or removes data, and plan for recovery where appropriate.

4. Make it better for the next person

If a sample helped, share its gallery link and credit the authors. If something is unclear or no longer works, report an issue with the sample name, tool version, and a redacted description of the problem.

You can also improve a sample or share your own. You do not need to know how the website is built.

Learn with the community

Join a community call to learn, ask questions, or see practical demos. Sharing is caring provides hands-on help for new GitHub contributors.

Browse the gallery | Share a sample | Earn your contributor badge