Skip to content

Commit

Permalink
Merge pull request #42 from AndiBellstedt/Development
Browse files Browse the repository at this point in the history
#1.3.0.0 Release V1.3 - Bugfixes and some new Teams functions
  • Loading branch information
AndiBellstedt authored Mar 22, 2021
2 parents 7118eeb + 5537e37 commit 7bee2b9
Show file tree
Hide file tree
Showing 78 changed files with 6,259 additions and 2,592 deletions.
41 changes: 33 additions & 8 deletions MSGraph/MSGraph.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
RootModule = 'MSGraph.psm1'

# Version number of this module.
ModuleVersion = '1.2.9.1'
ModuleVersion = '1.3.0.0'

# ID used to uniquely identify this module
GUID = '5f61c229-95d0-4423-ab50-938c0723ad21'

# Author of this module
Author = 'Friedrich Weinmann, Andreas Bellstedt'
Author = 'Andreas Bellstedt, Friedrich Weinmann'

# Company or vendor of this module
CompanyName = ''

# Copyright statement for this module
Copyright = 'Copyright (c) 2018 Friedrich Weinmann, Andreas Bellstedt'
Copyright = 'Copyright (c) 2018 Andreas Bellstedt, Friedrich Weinmann'

# Description of the functionality provided by this module
Description = 'Tools for interacting with the Microsoft Graph Api'
Expand Down Expand Up @@ -70,6 +70,13 @@
'xml\MSGraph.Exchange.MailboxSetting.AutomaticRepliesSetting.Format.ps1xml',
'xml\MSGraph.Exchange.MailboxSetting.WorkingHoursSetting.Format.ps1xml',
'xml\MSGraph.Exchange.MailboxSetting.LocaleInfoSetting.Format.ps1xml'

# Teams
'xml\MSGraph.Teams.Team.Format.ps1xml',
'xml\MSGraph.Teams.TeamChannel.Format.ps1xml'

#AzureAD
'xml\MSGraph.AzureAD.Users.User.Format.ps1xml'
)

# Type files (.ps1xml) to be loaded when importing this module
Expand All @@ -90,7 +97,14 @@
'xml\MSGraph.Exchange.MailboxSetting.MailboxSettings.Types.ps1xml'
'xml\MSGraph.Exchange.MailboxSetting.AutomaticRepliesSetting.Types.ps1xml',
'xml\MSGraph.Exchange.MailboxSetting.WorkingHoursSetting.Types.ps1xml',
'xml\MSGraph.Exchange.MailboxSetting.LocaleInfoSetting.Types.ps1xml'
'xml\MSGraph.Exchange.MailboxSetting.LocaleInfoSetting.Types.ps1xml',

# Teams
'xml\MSGraph.Teams.Team.Types.ps1xml'
'xml\MSGraph.Teams.TeamChannel.Types.ps1xml'

#AzureAD
'xml\MSGraph.AzureAD.Users.User.Types.ps1xml'
)

# Modules to import as nested modules of the module specified in
Expand Down Expand Up @@ -134,6 +148,15 @@
'Get-MgaMailboxSetting',
'Set-MgaMailboxSetting',

# Teams
## Team
'Get-MgaTeam',
'Get-MgaTeamMember',
'Get-MgaTeamOwner',

## Teamchannel
'Get-MgaTeamChannel',

# Core
'Invoke-MgaRestMethodGet',
'Invoke-MgaRestMethodPatch',
Expand Down Expand Up @@ -198,20 +221,22 @@
'Outlook',
'Messages',
'Mail',
"Email"
"Email",
'PSEdition_Desktop',
'Windows'
)

# A URL to the license for this module.
LicenseUri = 'https://github.com/FriedrichWeinmann/MSGraph/blob/master/LICENSE'
LicenseUri = 'https://github.com/AndiBellstedt/MSGraph/blob/master/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/FriedrichWeinmann/MSGraph'
ProjectUri = 'https://github.com/AndiBellstedt/MSGraph'

# A URL to an icon representing this module.
IconUri = 'https://github.com/AndiBellstedt/MSGraph/tree/Development/MSGraph/assets/MSGraph_128x128.png'

# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/FriedrichWeinmann/MSGraph/blob/master/MSGraph/changelog.md'
ReleaseNotes = 'https://github.com/AndiBellstedt/MSGraph/blob/master/MSGraph/changelog.md'

} # End of PSData hashtable

Expand Down
18 changes: 13 additions & 5 deletions MSGraph/MSGraph.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This is important when testing for paths.

# Detect whether at some level loading individual module files, rather than the compiled module was enforced
$importIndividualFiles = Get-PSFConfigValue -FullName MSGraph.Import.IndividualFiles -Fallback $false
if ($MSGraph_importIndividualFiles) { $importIndividualFiles = $true }
if ($PoShPRTG_importIndividualFiles) { $importIndividualFiles = $true }
if (Test-Path (Resolve-PSFPath -Path "$($script:ModuleRoot)\..\.git" -SingleItem -NewChild)) { $importIndividualFiles = $true }
if ("<was not compiled>" -eq '<was not compiled>') { $importIndividualFiles = $true }

Expand Down Expand Up @@ -44,14 +44,20 @@ function Import-ModuleFile {
$Path
)

if ($doDotSource) { . (Resolve-Path $Path) }
else { $ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create([io.file]::ReadAllText((Resolve-Path $Path)))), $null, $null) }
$resolvedPath = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($Path).ProviderPath
if ($doDotSource) {
. $resolvedPath
} else {
$ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create([io.file]::ReadAllText($resolvedPath))), $null, $null)
}
}

#region Load individual files
if ($importIndividualFiles) {
# Execute Preimport actions
. Import-ModuleFile -Path "$ModuleRoot\internal\scripts\preimport.ps1"
foreach ($path in (& "$ModuleRoot\internal\scripts\preimport.ps1")) {
. Import-ModuleFile -Path $path
}

# Import all internal functions
foreach ($function in (Get-ChildItem "$ModuleRoot\internal\functions" -Filter "*.ps1" -Recurse -ErrorAction Ignore)) {
Expand All @@ -64,7 +70,9 @@ if ($importIndividualFiles) {
}

# Execute Postimport actions
. Import-ModuleFile -Path "$ModuleRoot\internal\scripts\postimport.ps1"
foreach ($path in (& "$ModuleRoot\internal\scripts\postimport.ps1")) {
. Import-ModuleFile -Path $path
}

# End it here, do not load compiled code below
return
Expand Down
Binary file modified MSGraph/bin/MSGraph.dll
Binary file not shown.
Binary file modified MSGraph/bin/MSGraph.pdb
Binary file not shown.
Loading

0 comments on commit 7bee2b9

Please sign in to comment.