├── .gitignore ├── Export-Microsoft365LicenseStatus.ps1 ├── Export-Office365LicenseStatus.ps1 ├── LICENSE ├── README.md ├── README_v1.md ├── SECURITY.md └── ja-jp ├── README.md └── README_v1.md /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /Export-Microsoft365LicenseStatus.ps1: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft. All rights reserved. 2 | # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 3 | 4 | # Version information 5 | # v2.0 6 | 7 | <# 8 | .SYNOPSIS 9 | This is a sample script that exports license status information of Microsoft 365 users. 10 | 11 | .DESCRIPTION 12 | This script runs Get-MgUser and Get-MgUserLicenseDetail cmdlet to collect license information. 13 | The output of this script is a PSCustomObject. 14 | To export the output to a csv file, you need to use Export-Csv cmdlet. 15 | The Microsoft Graph PowerShell SDK must be installed on your computer, and need to be connected to Microsoft Graph. 16 | You need to have at least 'User.Read.All' and 'Organization.Read.All' permissions to use this script. 17 | If you want to use a delegated permission to connect to Microsoft Graph, run the following command. 18 | e.g. Connect-MgGraph -Scopes "Organization.Read.All","User.ReadWrite.All" 19 | 20 | .PARAMETER UserPrincipalName 21 | The UserPrincipalName of the user to be exported. 22 | 23 | .PARAMETER All 24 | When exporting all users' information, if this swich parameter is specified, the list of users will be obtained using "Get-MgUser -All". 25 | If this switch parameter is not specified, the list of users will be obtained using "Get-MgUser". 26 | 27 | .PARAMETER ExportNoLicenseUser 28 | Switch to include non license assigned users' information. 29 | 30 | .PARAMETER Force 31 | Switch to suppress a confirmation when exporting all users' information. 32 | 33 | .EXAMPLE 34 | .\Export-Microsoft365LicenseStatus.ps1 -All 35 | 36 | Export all users' license status information. 37 | 38 | .EXAMPLE 39 | .\Export-Microsoft365LicenseStatus.ps1 -All | Export-Csv c:\Temp\LicenseReport.csv 40 | 41 | Export all users' license status information to a CSV file. 42 | 43 | .EXAMPLE 44 | .\Export-Microsoft365LicenseStatus.ps1 -UserPrincipalName user01@contoso.onmicrosoft.com 45 | 46 | Export the license status information of the specific user. 47 | 48 | .EXAMPLE 49 | .\Export-Microsoft365LicenseStatus.ps1 -UserPrincipalName user01@contoso.onmicrosoft.com | Export-Csv c:\Temp\LicenseReport.csv 50 | 51 | Export the license status information of the specific user to a CSV file. 52 | 53 | .NOTES 54 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 55 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 56 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 57 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 58 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 59 | 60 | .LINK 61 | https://github.com/microsoft/Export-Microsoft365LicenseStatus 62 | #> 63 | 64 | [CmdletBinding()] 65 | Param( 66 | [Parameter(ParameterSetName = "User", Mandatory = $true, ValueFromPipeline = $True)] 67 | [ValidateNotNullOrEmpty()] 68 | [string] 69 | $UserPrincipalName, 70 | 71 | [Parameter(ParameterSetName = "All", Mandatory = $true, ValueFromPipeline = $False)] 72 | [switch] 73 | $All, 74 | 75 | [Parameter(ParameterSetName = "User", Mandatory = $false, ValueFromPipeline = $False)] 76 | [Parameter(ParameterSetName = "All", Mandatory = $false, ValueFromPipeline = $False)] 77 | [Parameter(ParameterSetName = "WithoutAll", Mandatory = $false, ValueFromPipeline = $False)] 78 | [switch] 79 | $ExportNoLicenseUser, 80 | 81 | [Parameter(ParameterSetName = "All", Mandatory = $false, ValueFromPipeline = $False)] 82 | [Parameter(ParameterSetName = "WithoutAll", Mandatory = $false, ValueFromPipeline = $False)] 83 | [switch] 84 | $Force 85 | ) 86 | 87 | Begin { 88 | function CreateOutput { 89 | [CmdletBinding()] 90 | param 91 | ( 92 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 93 | [object] 94 | $User, 95 | 96 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 97 | [AllowEmptyString()] 98 | [string] 99 | $SkuPartNumber, 100 | 101 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 102 | [AllowEmptyString()] 103 | [string] 104 | $ServicePlanName, 105 | 106 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 107 | [AllowEmptyString()] 108 | [string] 109 | $ProvisioningStatus 110 | ) 111 | 112 | Write-Verbose "Enter : CreateOutput" 113 | 114 | $Result = [PSCustomObject]@{ 115 | UserPrincipalName = $User.UserPrincipalName; 116 | DisplayName = $User.DisplayName; 117 | Department = $User.Department; 118 | UsageLocation = $User.UsageLocation; 119 | SkuPartNumber = $SkuPartNumber; 120 | ServicePlanName = $ServicePlanName; 121 | ProvisioningStatus = $ProvisioningStatus 122 | } 123 | 124 | Write-Verbose " UserPrincipalName = $($User.UserPrincipalName); SkuPartNumber = $SkuPartNumber; ServicePlanName = $ServicePlanName; ProvisioningStatus = $ProvisioningStatus" 125 | $Result 126 | 127 | Write-Verbose "Exit : CreateOutput" 128 | } 129 | 130 | function Setup () { 131 | Write-Verbose "Enter : Setup" 132 | 133 | Write-Verbose " PSEdition : $PSEdition" 134 | Write-Verbose " PSVersion : $($PSVersionTable.PSVersion)" 135 | 136 | if ($PSEdition -ne "Core" -or $PSVersionTable.PSVersion.Major -lt 7) { 137 | Write-Error "This script supports only PowerShell 7. Please try again using PowerShell 7." 138 | } 139 | 140 | Write-Verbose " Parameter set name is '$($PSCmdlet.ParameterSetName)'." 141 | 142 | if ($PSCmdlet.ParameterSetName -ne "User") { 143 | if ($Force -or $PSCmdlet.ShouldContinue("Do you really want to continue?", "This script runs Get-MgUser to get all users and Get-MgUserLicenseDetail for all users. It may take long time to complete, or execution may fail due to Microsoft Graph throttling.")) { 144 | Write-Verbose " It was accepted to run Get-MgUser to get all users and Get-MgUserLicenseDetail to all users." 145 | } 146 | else { 147 | Write-Verbose " It was not accepted to run Get-MgUser to get all users and Get-MgUserLicenseDetail to all users." 148 | exit 149 | } 150 | } 151 | 152 | # Check the connectivity 153 | Write-Verbose " Setup : Execute MgContext cmdlet as a test." 154 | 155 | $GetMgContect = Get-Command Get-MgContext -ErrorAction SilentlyContinue 156 | 157 | if ($null -eq $GetMgContect) { 158 | Write-Error "Get-MgContext was not found. Install Microsoft Graph PowerShell and try again." 159 | exit 160 | } 161 | 162 | $MgContext = Get-MgContext 163 | 164 | if ($null -eq $MgContext) { 165 | Write-Verbose " Setup : Get-MgContext cmdlet failed." 166 | 167 | Write-Error "You need to execute Connect-MgGraph cmdlet to connect to Microsoft Graph. Run 'Connect-MgGraph -Scopes `"Organization.Read.All`",`"User.ReadWrite.All`"' and try again." 168 | exit 169 | } 170 | 171 | if ( 172 | !( 173 | $MgContext.Scopes.Contains("User.Read.All") -or 174 | $MgContext.Scopes.Contains("User.ReadWrite.All") -or 175 | $MgContext.Scopes.Contains("Directory.Read.All") -or 176 | $MgContext.Scopes.Contains("Directory.ReadWrite.All") 177 | ) -or 178 | !( 179 | $MgContext.Scopes.Contains("Organization.Read.All") -or 180 | $MgContext.Scopes.Contains("Organization.ReadWrite.All") -or 181 | $MgContext.Scopes.Contains("Directory.Read.All") -or 182 | $MgContext.Scopes.Contains("Directory.ReadWrite.All") 183 | )) { 184 | Write-Error "You need to have at least 'User.Read.All' and 'Organization.Read.All' permissions to use this script." 185 | exit 186 | } 187 | 188 | 189 | 190 | Set-Variable -Name SetupDone -Value $true -Scope 1 191 | 192 | Write-Verbose "Exit : Setup" 193 | } 194 | 195 | Setup 196 | } 197 | 198 | Process { 199 | if (-not $SetupDone) { Setup } 200 | 201 | Write-Verbose "Enter : Main method." 202 | 203 | $Users = @() 204 | 205 | if ($UserPrincipalName -ne $null -and $UserPrincipalName -ne "") { 206 | # Get specified user 207 | Write-Verbose " Execute Get-MgUser -UserId cmdlet because UserPrincipalName parameter is specified." 208 | $Users = Get-MgUser -UserId $UserPrincipalName -Property Id, UserPrincipalName, DisplayName, Department, UsageLocation, AssignedLicenses 209 | } 210 | else { 211 | if ($All) { 212 | # Get all users using Get-MgUser -All 213 | Write-Verbose " Execute Get-MgUser -All cmdlet because All parameter is specified." 214 | $Users = Get-MgUser -All -Property Id, UserPrincipalName, DisplayName, Department, UsageLocation, AssignedLicenses 215 | } 216 | else { 217 | # Get all users using Get-MgUser 218 | Write-Verbose " Execute Get-MgUser cmdlet." 219 | $Users = Get-MgUser -All -Property Id, UserPrincipalName, DisplayName, Department, UsageLocation, AssignedLicenses 220 | } 221 | } 222 | 223 | if ($Users.Count -eq 0) { 224 | # No users found 225 | Write-Verbose " User not found." 226 | return 227 | } 228 | 229 | Write-Verbose " $($Users.Count) user(s) found." 230 | 231 | foreach ($User in $Users) { 232 | Write-Verbose " Working with $($User.UserPrincipalName)" 233 | 234 | if ($null -eq $User.AssignedLicenses -or $User.AssignedLicenses.Count -eq 0) { 235 | # No license is assigned to this user. 236 | Write-Verbose " $($User.UserPrincipalName) has no license." 237 | 238 | if ($ExportNoLicenseUser) { 239 | Write-Verbose " Create output object for $($User.UserPrincipalName) ." 240 | CreateOutput -User $User -SkuPartNumber "" -ServicePlanName "" -ProvisioningStatus "" 241 | } 242 | } 243 | else { 244 | # This user has license(s). 245 | Write-Verbose " $($User.UserPrincipalName) has license(s)." 246 | 247 | # Get detailed license information. 248 | Write-Verbose " Execute Get-MgUserLicenseDetail cmdlet." 249 | $LicenseDetails = Get-MgUserLicenseDetail -UserId $User.UserPrincipalName 250 | 251 | Write-Verbose " Create output object for $($User.UserPrincipalName) ." 252 | 253 | foreach ($License in $LicenseDetails) { 254 | foreach ($ServiceStatus in $License.ServicePlans) { 255 | CreateOutput -User $User -SkuPartNumber $License.SkuPartNumber -ServicePlanName $ServiceStatus.ServicePlanName -ProvisioningStatus $ServiceStatus.ProvisioningStatus 256 | } 257 | } 258 | } 259 | } 260 | 261 | Write-Verbose "Exit : Main method." 262 | } 263 | 264 | End {} 265 | -------------------------------------------------------------------------------- /Export-Office365LicenseStatus.ps1: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft. All rights reserved. 2 | # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 3 | 4 | # Version information 5 | # v1.0 6 | 7 | <# 8 | .SYNOPSIS 9 | This is a sample script that exports license status information of Office 365 users. 10 | 11 | .DESCRIPTION 12 | This script runs Get-MsolUser cmdlet to collect license information. 13 | The output of this script is PSCustomObject or a CSV file. 14 | The Azure AD Module (MSOnline) must be installed on your computer. 15 | 16 | .PARAMETER UserPrincipalName 17 | The UserPrincipalName of the user to be exported. 18 | 19 | .PARAMETER All 20 | When exporting all user's information, set this parameter to True. 21 | 22 | .PARAMETER CsvOutputPath 23 | The path for output file. 24 | Use this parameter only when exporting as a CSV file. 25 | 26 | .PARAMETER ExportNoLicenseUser 27 | Switch to include non license assigned user's information. 28 | 29 | .PARAMETER Force 30 | Switch to force the output file to be overwritten when the file is already existed. 31 |   32 | .EXAMPLE 33 | Export all users' information 34 | 35 | .\Export-Office365LicenseStatus.ps1 -All $true 36 | 37 | .EXAMPLE 38 | Export the specific user's information. 39 | 40 | .\Export-Office365LicenseStatus.ps1 -UserPrincipalName User01@contoso.onmicrosoft.com 41 |   42 | .EXAMPLE 43 | Export as a CSV file. 44 | 45 | .\Export-Office365LicenseStatus.ps1 -UserPrincipalName User01@contoso.onmicrosoft.com -CsvOutputPath C:\temp\exporttest.csv 46 | 47 | .NOTES 48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 49 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 50 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 51 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 52 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 53 | 54 | .LINK 55 | https://github.com/Microsoft/Export-Office365LicenseStatus 56 | #> 57 | 58 | [CmdletBinding()] 59 | Param( 60 | [Parameter(ParameterSetName = "UserCsv", Mandatory = $true, ValueFromPipeline = $True)] 61 | [Parameter(ParameterSetName = "UserPSObject", Mandatory = $true, ValueFromPipeline = $True)] 62 | [ValidateNotNullOrEmpty()] 63 | [string] 64 | $UserPrincipalName, 65 | 66 | [Parameter(ParameterSetName = "AllCsv", Mandatory = $true, ValueFromPipeline = $False)] 67 | [Parameter(ParameterSetName = "AllPSObject", Mandatory = $true, ValueFromPipeline = $False)] 68 | [bool] 69 | $All, 70 | 71 | [Parameter(ParameterSetName = "UserCsv", Mandatory = $true, ValueFromPipeline = $False)] 72 | [Parameter(ParameterSetName = "AllCsv", Mandatory = $true, ValueFromPipeline = $False)] 73 | [ValidateNotNullOrEmpty()] 74 | [string] 75 | $CsvOutputPath, 76 | 77 | [Parameter(ValueFromPipeline = $False)] 78 | [switch] 79 | $ExportNoLicenseUser, 80 | 81 | [Parameter(ValueFromPipeline = $False)] 82 | [switch] 83 | $Force 84 | ) 85 | 86 | Begin { 87 | function CreateOutput { 88 | [CmdletBinding()] 89 | param 90 | ( 91 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 92 | [object] 93 | $User, 94 | 95 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 96 | [AllowEmptyString()] 97 | [string] 98 | $AccountSkuId, 99 | 100 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 101 | [AllowEmptyString()] 102 | [string] 103 | $ServiceName, 104 | 105 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 106 | [AllowEmptyString()] 107 | [string] 108 | $ProvisioningStatus, 109 | 110 | [Parameter(Mandatory = $True, ValueFromPipeline = $False)] 111 | [bool] 112 | $CSV 113 | ) 114 | 115 | Write-Verbose "Enter : CreateOutput" 116 | 117 | $Result = [PSCustomObject]@{ 118 | UserPrincipalName = $User.UserPrincipalName; 119 | DisplayName = $User.DisplayName; 120 | Department = $User.Department; 121 | UsageLocation = $User.UsageLocation; 122 | AccountSkuId = $AccountSkuId; 123 | ServiceName = $ServiceName; 124 | ProvisioningStatus = $ProvisioningStatus 125 | } 126 | 127 | Write-Verbose " UserPrincipalName = $($User.UserPrincipalName); AccountSkuId = $AccountSkuId; ServiceName = $ServiceName; ProvisioningStatus = $ProvisioningStatus" 128 | 129 | if ($CSV) { 130 | Write-Verbose " CreateOutput : Writing CSV." 131 | $Result | Export-Csv -Path $CsvOutputPath -Encoding Default -Append -NoTypeInformation -Force 132 | } 133 | else { 134 | Write-Verbose " CreateOutput : Writing PSObject." 135 | $Result 136 | } 137 | 138 | Write-Verbose "Exit : CreateOutput" 139 | } 140 | 141 | function Setup () { 142 | Write-Verbose "Enter : Setup" 143 | 144 | # Check the connectivity 145 | Write-Verbose " Setup : Execute Get-MsolUser Cmdlet as a test." 146 | Get-MsolUser -MaxResults 1 -ErrorVariable MsolError -ErrorAction SilentlyContinue | Out-Null 147 | 148 | if ($MsolError -ne $null) { 149 | Write-Verbose " Setup : Get-MsolUser Cmdlet failed." 150 | 151 | # Connect to Azure Active Directory 152 | Write-Verbose " Setup : Execute Connect-MsolService Cmdlet." 153 | Connect-MsolService -ErrorVariable MsolError 154 | 155 | if ($MsolError -ne $null) { 156 | # Could not connect to Azure Active Directory 157 | Write-Verbose " Setup : Connect-MsolService Cmdlet failed." 158 | exit 159 | } 160 | } 161 | 162 | if ($CsvOutputPath -ne $null -and $CsvOutputPath -ne "") { 163 | # Check the output path 164 | Write-Verbose " Setup : Execute New-Item Cmdlet as a test of CsvOutputPath parameter." 165 | 166 | if ($Force) { 167 | New-Item $CsvOutputPath -ItemType File -ErrorVariable FileError -Force | Out-Null 168 | } 169 | else { 170 | New-Item $CsvOutputPath -ItemType File -ErrorVariable FileError | Out-Null 171 | } 172 | 173 | if ($FileError -ne $null) { 174 | Write-Verbose " Setup : New-Item Cmdlet failed." 175 | exit 176 | } 177 | 178 | Write-Verbose " Setup : Output of this script will be CSV." 179 | Set-Variable -Name ExportToCsv -Value $true -Scope 1 180 | } 181 | else { 182 | Write-Verbose " Setup : Output of this script will be PSObject." 183 | Set-Variable -Name ExportToCsv -Value $false -Scope 1 184 | } 185 | 186 | Set-Variable -Name SetupDone -Value $true -Scope 1 187 | 188 | Write-Verbose "Exit : Setup" 189 | } 190 | 191 | Setup 192 | } 193 | 194 | Process { 195 | if (-not $SetupDone) { Setup } 196 | 197 | Write-Verbose "Enter : Main method." 198 | 199 | $Users = @(); 200 | 201 | if ($UserPrincipalName -ne $null -and $UserPrincipalName -ne "") { 202 | # Get specified user 203 | Write-Verbose " Execute Get-MsolUser -UserPrincipalName Cmdlet because UserPrincipalName parameter is specified." 204 | $Users = Get-MsolUser -UserPrincipalName $UserPrincipalName 205 | } 206 | else { 207 | if ($All) { 208 | # Get all users 209 | Write-Verbose " Execute Get-MsolUser -All Cmdlet because All parameter is specified." 210 | $Users = Get-MsolUser -All 211 | } 212 | else { 213 | # Get partial users 214 | Write-Verbose " Execute Get-MsolUser Cmdlet." 215 | $Users = Get-MsolUser 216 | } 217 | } 218 | 219 | if ($Users.Count -eq 0) { 220 | # No users found 221 | Write-Verbose " User not found." 222 | return 223 | } 224 | 225 | Write-Verbose " $($Users.Count) user(s) found." 226 | 227 | foreach ($User in $Users) { 228 | Write-Verbose " Working with $($User.UserPrincipalName)" 229 | if ($User.Licenses -eq $null -or $User.Licenses.Count -eq 0) { 230 | # This user is not assigned a license 231 | Write-Verbose " $($User.UserPrincipalName) is not assigned a licens." 232 | 233 | if ($ExportNoLicenseUser) { 234 | Write-Verbose " Create output object for $($User.UserPrincipalName) ." 235 | CreateOutput -User $User -AccountSkuId "" -ServiceName "" -ProvisioningStatus "" -CSV $ExportToCsv 236 | } 237 | } 238 | else { 239 | # This user is assigned licenses 240 | Write-Verbose " $($User.UserPrincipalName) is assigned licenses." 241 | Write-Verbose " Create output object for $($User.UserPrincipalName) ." 242 | 243 | foreach ($License in $User.Licenses) { 244 | foreach ($ServiceStatus in $License.ServiceStatus) { 245 | CreateOutput -User $User -AccountSkuId $License.AccountSkuId -ServiceName $ServiceStatus.ServicePlan.ServiceName -ProvisioningStatus $ServiceStatus.ProvisioningStatus -CSV $ExportToCsv 246 | } 247 | } 248 | } 249 | } 250 | 251 | Write-Verbose "Exit : Main method." 252 | } 253 | 254 | End {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Export-Microsoft365LicenseStatus 2 | 3 | [日本語版 README はこちら](https://github.com/microsoft/Export-Microsoft365LicenseStatus/tree/master/ja-jp) 4 | 5 | You can export license status information of Microsoft 365 users. 6 | 7 | > :exclamation: If you are looking for Export-Office365LicenseStatus (MSOL version), please see [here](README_v1.md) 8 | 9 | ## Download option 10 | 11 | Download Export-Microsoft365LicenseStatus from [Releases](https://github.com/microsoft/Export-Microsoft365LicenseStatus/releases) page. 12 | 13 | ## Prerequisites 14 | 15 | - This script supports only PowerShell 7. 16 | - You have to install the Microsoft Graph PowerShell SDK on your computer. Please refer to [this](https://docs.microsoft.com/en-us/graph/powershell/installation) page for more information. 17 | - You need to have at least 'User.Read.All' and 'Organization.Read.All' permissions to use this script. If you want to use the delegated permissions to connect to Microsoft Graph, run the following command before running this script. You can also use the application permissions if you want. 18 | 19 | ```powershell 20 | Connect-MgGraph -Scopes "Organization.Read.All","User.ReadWrite.All" 21 | ``` 22 | 23 | ## Usage 24 | 25 | 1. Download Export-Microsoft365LicenseStatus and save on your computer. 26 | 2. Start PowerShell and go to the folder where you saved the file. 27 | 3. If you want to export all users' information, run the following command. 28 | 29 | ```powershell 30 | .\Export-Microsoft365LicenseStatus.ps1 -All 31 | ``` 32 | 33 | 4. If you want to export all users' information to a CSV file, run the following command. 34 | 35 | ```powershell 36 | .\Export-Microsoft365LicenseStatus.ps1 -All | Export-Csv c:\Temp\LicenseReport.csv 37 | ``` 38 | 39 | 5. If you want to export the specific user's information, run the following command. 40 | 41 | ```powershell 42 | .\Export-Microsoft365LicenseStatus.ps1 -UserPrincipalName user01@contoso.onmicrosoft.com 43 | ``` 44 | 45 | 6. If you want to export the specific user's information to a CSV file, run the following command. 46 | 47 | ```powershell 48 | .\Export-Microsoft365LicenseStatus.ps1 -UserPrincipalName user01@contoso.onmicrosoft.com | Export-Csv c:\Temp\LicenseReport.csv 49 | ``` 50 | 51 | ## Feedback 52 | 53 | If you have any feedback, please post on the [Issues](https://github.com/Microsoft/Export-Office365LicenseStatus/issues) list. 54 | 55 | ## Contributing 56 | 57 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 58 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 59 | the rights to use your contribution. For details, visit https://cla.microsoft.com. 60 | 61 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide 62 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions 63 | provided by the bot. You will only need to do this once across all repos using our CLA. 64 | 65 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 66 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 67 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 68 | -------------------------------------------------------------------------------- /README_v1.md: -------------------------------------------------------------------------------- 1 | # Export-Office365LicenseStatus 2 | 3 | [日本語版 README はこちら](https://github.com/Microsoft/Export-Office365LicenseStatus/tree/master/ja-jp/README_v1.md) 4 | 5 | You can export license status information of Office 365 users. 6 | 7 | > :exclamation: If you are looking for Export-Microsoft65LicenseStatus (Microsoft Graph version), please see [here](README.md) 8 | 9 | ## Download option 10 | 11 | Download Export-Office365LicenseStatus from [Release](https://github.com/microsoft/Export-Microsoft365LicenseStatus/releases/tag/v1.0) page. 12 | 13 | ## Usage 14 | 15 | 1. Download Export-Office365LicenseStatus and save on your computer. 16 | 2. Start Windows PowerShell and go to the folder where you saved the file. 17 | 3. If you want to export all users' information, run the following command. 18 | 19 | ~~~powershell 20 | .\Export-Office365LicenseStatus.ps1 -All $true 21 | ~~~ 22 | 23 | 4. If you want to export the specific user's information, run the following command. 24 | 25 | ~~~powershell 26 | .\Export-Office365LicenseStatus.ps1 -UserPrincipalName User01@contoso.onmicrosoft.com 27 | ~~~ 28 | 29 | 5. If you want to export as a CSV file, use CsvOutputPath option. 30 | 31 | ~~~powershell 32 | .\Export-Office365LicenseStatus.ps1 -UserPrincipalName User01@contoso.onmicrosoft.com -CsvOutputPath C:\temp\exporttest.csv 33 | ~~~ 34 | 35 | ## Prerequisites 36 | 37 | You have to install the Azure AD Module (MSOnline) on your computer. Please refer to [this](https://docs.microsoft.com/en-us/powershell/module/msonline/?view=azureadps-1.0) page for more information. 38 | 39 | 40 | ## Syntax 41 | 42 | ``` 43 | .\Export-LicenseStatus.ps1 -UserPrincipalName [-CsvOutputPath ] [-ExportNoLicenseUser] [-Force] [] 44 | ``` 45 | 46 | ``` 47 | .\Export-LicenseStatus.ps1 -All [-CsvOutputPath ] [-ExportNoLicenseUser] [-Force] [] 48 | ``` 49 | 50 | ## Feedback 51 | 52 | If you have any feedback, please post on the [Issues](https://github.com/Microsoft/Export-Office365LicenseStatus/issues) list. 53 | 54 | ## Contributing 55 | 56 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 57 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 58 | the rights to use your contribution. For details, visit https://cla.microsoft.com. 59 | 60 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide 61 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions 62 | provided by the bot. You will only need to do this once across all repos using our CLA. 63 | 64 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 65 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 66 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 67 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /ja-jp/README.md: -------------------------------------------------------------------------------- 1 | # Export-Microsoft365LicenseStatus 2 | 3 | Microsoft 365 ユーザーのライセンス付与状況をエクスポートできます。 4 | 5 | > :exclamation: Export-Office365LicenseStatus (MSOL 版) をお探しの場合は, [こちら](README_v1.md)をご参照ください。 6 | 7 | ## ダウンロード方法 8 | 9 | [release](https://github.com/microsoft/Export-Microsoft365LicenseStatus/releases) ページから Export-Microsoft365LicenseStatus をダウンロードしてください。 10 | 11 | ## 前提条件 12 | 13 | - このスクリプトは PowerShell 7 のみをサポートしています。 14 | - Microsoft Graph PowerShell SDK が実行端末にインストールされている必要があります。詳細は[こちら](https://docs.microsoft.com/ja-jp/graph/powershell/installation)のページをご参照ください。 15 | - このスクリプトを実行するには少なくとも 'User.Read.All' と 'Organization.Read.All' のアクセス許可が必要です。委任されたアクセス許可を使用して Microsoft Graph に接続する場合は、このスクリプトを実行する前に以下のコマンドを実行してください。必要に応じてアプリケーションのアクセス許可を使用することもできます。 16 | 17 | ```powershell 18 | Connect-MgGraph -Scopes "Organization.Read.All","User.ReadWrite.All" 19 | ``` 20 | 21 | ## 実行方法 22 | 23 | 1. Export-Microsoft365LicenseStatus をダウンロードして、実行端末に保存します。 24 | 2. PowerShell を起動して、ファイルを保存したフォルダーへ移動します。 25 | 3. すべてのユーザーの情報をエクスポートしたい場合は、以下のようにコマンドを実行します。 26 | 27 | ```powershell 28 | .\Export-Microsoft365LicenseStatus.ps1 -All 29 | ``` 30 | 31 | 4. すべてのユーザーの情報を CSV ファイルにエクスポートしたい場合は、以下のようにコマンドを実行します。 32 | 33 | ```powershell 34 | .\Export-Microsoft365LicenseStatus.ps1 -All | Export-Csv c:\Temp\LicenseReport.csv -Encoding ([System.Text.Encoding]::GetEncoding(932)) 35 | ``` 36 | 37 | 5. 特定のユーザーの情報をエクスポートしたい場合は、以下のようにコマンドを実行します。 38 | 39 | ```powershell 40 | .\Export-Microsoft365LicenseStatus.ps1 -UserPrincipalName user01@contoso.onmicrosoft.com 41 | ``` 42 | 43 | 6. 特定のユーザーの情報を CSV ファイルにエクスポートしたい場合は、以下のようにコマンドを実行します。 44 | 45 | ```powershell 46 | .\Export-Microsoft365LicenseStatus.ps1 -UserPrincipalName user01@contoso.onmicrosoft.com | Export-Csv c:\Temp\LicenseReport.csv -Encoding ([System.Text.Encoding]::GetEncoding(932)) 47 | ``` 48 | 49 | ## フィードバック 50 | 51 | スクリプトに関するフィードバックは [Issues](https://github.com/Microsoft/Export-Office365LicenseStatus/issues) に投稿してください。日本語でも構いません。 52 | 53 | 本プロジェクトへの参加に関しては、[英語版 README の Contributing セクション](https://github.com/Microsoft/Export-Office365LicenseStatus/#contributing)をご参照ください。 -------------------------------------------------------------------------------- /ja-jp/README_v1.md: -------------------------------------------------------------------------------- 1 | # Export-Office365LicenseStatus 2 | 3 | Office 365 ユーザーのライセンス付与状況をエクスポートできます。 4 | 5 | > :exclamation: Export-Microsoft65LicenseStatus (Microsoft Graph 版) をお探しの場合は, [こちら](READMEs.md) をご参照ください。 6 | 7 | ## ダウンロード方法 8 | 9 | [release](https://github.com/microsoft/Export-Microsoft365LicenseStatus/releases/tag/v1.0) ページから Export-Office365LicenseStatus をダウンロードしてください。 10 | 11 | ## 実行方法 12 | 13 | 1. Export-Office365LicenseStatus をダウンロードして、実行端末に保存します。 14 | 2. Windows PowerShell を起動して、ファイルを保存したフォルダーへ移動します。 15 | 3. すべてのユーザーの情報をエクスポートしたい場合は、以下のようにコマンドを実行します。 16 | 17 | ~~~powershell 18 | .\Export-Office365LicenseStatus.ps1 -All $true 19 | ~~~ 20 | 21 | 4. 特定のユーザーの情報をエクスポートしたい場合は、以下のようにコマンドを実行します。 22 | 23 | ~~~powershell 24 | .\Export-Office365LicenseStatus.ps1 -UserPrincipalName User01@contoso.onmicrosoft.com 25 | ~~~ 26 | 27 | 5. CSV ファイルにエクスポートしたい場合は、CsvOutputPath パラメーターを使用します。 28 | 29 | ~~~powershell 30 | .\Export-Office365LicenseStatus.ps1 -UserPrincipalName User01@contoso.onmicrosoft.com -CsvOutputPath C:\temp\exporttest.csv 31 | ~~~ 32 | 33 | ## 前提条件 34 | 35 | PowerShell の Azure AD モジュール (MSOnline) が実行端末にインストールされている必要があります。詳細は[こちら](https://docs.microsoft.com/en-us/powershell/module/msonline/?view=azureadps-1.0)のページをご参照ください。 36 | 37 | ## 構文 38 | 39 | ``` 40 | .\Export-LicenseStatus.ps1 -UserPrincipalName [-CsvOutputPath ] [-ExportNoLicenseUser] [-Force] [] 41 | ``` 42 | 43 | ``` 44 | .\Export-LicenseStatus.ps1 -All [-CsvOutputPath ] [-ExportNoLicenseUser] [-Force] [] 45 | ``` 46 | 47 | ## フィードバック 48 | 49 | スクリプトに関するフィードバックは [Issues](https://github.com/Microsoft/Export-Office365LicenseStatus/issues) に投稿してください。日本語でも構いません。 50 | 51 | 本プロジェクトへの参加に関しては、[英語版 README の Contributing セクション](https://github.com/Microsoft/Export-Office365LicenseStatus/#contributing)をご参照ください。 --------------------------------------------------------------------------------