When contributing to this repository, please first open an an issue describing the update you wish to make, and read over our guidelines.
There are a few different recommended paths to get contributions into the released version of this SDK.
The best way to get started with a contribution is to start a dialog with us. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution, especially for large work items.
- Clone the repo - https://github.com/microsoftgraph/msgraph-sdk-powershell.git.
- Identify the module(s) that you want add the custom cmdlets to. E.g. Groups.
- Navigate to the module’s custom folder. E.g. Groups/custom. In here, you will find a readme.md that has basic instructions on how to add custom cmdlets. A full guide can be found here.
- In the custom directory, add your custom cmdlet naming the file as
{Verb}Mg{Subject}_{Variant}.(cs|ps). This file will contain the implementation of your custom cmdlet. You can refer to NewMgGroupMember_Create.cs as an example. - Once done, bump up the module version number in the module’s root readme.md then run
.\msgraph-sdk-powershell\tools\GenerateModules.ps1 -Buildto create, build and export the cmdlets to..\exportsfolder.
When it comes to modifying existing cmdlets, we recommend you use AutoREST directive.
- Identify cmdlets you want to modify, and the modules they reside in.
- In the module’s
readme.md, add your directive in the AutoREST configuration sections to modify the lower-level cmdlets.
See our SDK generation steps wiki for more information.
- In a terminal run
.\tools\GenerateAuthenticationModule.ps1 -Build -Pack - In Visual Studio open the
.\src\Authentication\Authentication.slnsolution - Start the project in debug mode
- In the newly opened terminal run
pwdto get the current working directory for the debug session - Copy the
Microsoft.Graph.Authencation.<version-number>.nupkgto the working directory for the debug session - Rename the
.nupkgfile to.zip - Unzip the files to the working directory
- In the working directory run
Import-Module .\Microsoft.Graph.Authentication.psm1 - Run any cmdlet from the Authentication module to hit your breakpoints