Skip to content

Comments

Export Copilot Usage to CSV files#3

Merged
rulasg merged 10 commits intomainfrom
rulasg/issue2
Dec 19, 2023
Merged

Export Copilot Usage to CSV files#3
rulasg merged 10 commits intomainfrom
rulasg/issue2

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Dec 19, 2023

Fixes #2

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@@ -0,0 +1,156 @@
function Export-CopilotUsageOrgTotals{

Check warning

Code scanning / PSScriptAnalyzer

The cmdlet 'Export-CopilotUsageOrgTotals' uses a plural noun. A singular noun should be used instead.

The cmdlet 'Export-CopilotUsageOrgTotals' uses a plural noun. A singular noun should be used instead.

} Export-ModuleMember -Function Export-CopilotUsageEnterpriseBreakdown

function Convert-UsageToCsvTotals{

Check warning

Code scanning / PSScriptAnalyzer

The cmdlet 'Convert-UsageToCsvTotals' uses a plural noun. A singular noun should be used instead.

The cmdlet 'Convert-UsageToCsvTotals' uses a plural noun. A singular noun should be used instead.
[Parameter()][switch]$PassThru
)
process{
"Importing module Name[{0}] Version[{1}] AllowPrerelease[{2}]" -f $Name, $Version, $AllowPrerelease | Write-Host -ForegroundColor DarkGray

Check warning

Code scanning / PSScriptAnalyzer

File 'test.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.

File 'test.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
$module = Import-Module $Name -PassThru -ErrorAction SilentlyContinue -RequiredVersion:$semVer

if ($null -eq $module) {
"Installing module Name[{0}] Version[{1}] AllowPrerelease[{2}]" -f $Name, $Version, $AllowPrerelease | Write-Host -ForegroundColor DarkGray

Check warning

Code scanning / PSScriptAnalyzer

File 'test.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.

File 'test.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
@rulasg rulasg self-assigned this Dec 19, 2023
@rulasg rulasg merged commit fdec68a into main Dec 19, 2023
@rulasg rulasg deleted the rulasg/issue2 branch December 19, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export-CopilotUsage

1 participant