Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed May 31, 2020
1 parent e3d289b commit d7faf1f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 8 deletions.
7 changes: 4 additions & 3 deletions PSWinDocumentation.O365.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Przemyslaw Klys
#
# Generated on: 04.04.2020
# Generated on: 31.05.2020
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = 'PSWinDocumentation.O365.psm1'

# Version number of this module.
ModuleVersion = '0.0.6'
ModuleVersion = '0.0.7'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -51,7 +51,8 @@
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'PSSharedGoods'; GUID = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'; ModuleVersion = '0.0.133'; })
RequiredModules = @(@{ModuleName = 'PSSharedGoods'; GUID = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'; ModuleVersion = '0.0.144'; },
@{ModuleName = 'MSOnline'; GUID = 'd162594e-d7aa-42be-9884-84928d3f7acf'; ModuleVersion = '1.1.183.57'; })

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()
Expand Down
2 changes: 1 addition & 1 deletion Private/Get-WinAzureRolesMembers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#>
#$Member
} else {
Add-Member -InputObject $U -MemberType NoteProperty -Name 'Role' -Value $_.Name
Add-Member -InputObject $U -MemberType NoteProperty -Name 'Role' -Value $_.Name -Force
$U
}
}
Expand Down
30 changes: 30 additions & 0 deletions Private/Get-WinAzureSettings.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function Get-WinAzureSettings {
[CmdletBinding()]
param(
[Array] $UAzureCompany,
[switch] $Formatted,
[string] $Splitter
)
if ($null -eq $UAzureCompany) {
$UAzureCompany = Get-WinUAzureCompany
}


if ($Formatted) {
[PSCustomObject] @{
'SelfServePasswordResetEnabled' = $UAzureCompany.SelfServePasswordResetEnabled # : True
'UsersPermissionToCreateGroupsEnabled' = $UAzureCompany.UsersPermissionToCreateGroupsEnabled # : True
'UsersPermissionToCreateLOBAppsEnabled' = $UAzureCompany.UsersPermissionToCreateLOBAppsEnabled # : True
'UsersPermissionToReadOtherUsersEnabled' = $UAzureCompany.UsersPermissionToReadOtherUsersEnabled # : True
'UsersPermissionToUserConsentToAppEnabled' = $UAzureCompany.UsersPermissionToUserConsentToAppEnabled # : False
}
} else {
[PSCustomObjects] @{
SelfServePasswordResetEnabled = $UAzureCompany.SelfServePasswordResetEnabled # : True
UsersPermissionToCreateGroupsEnabled = $UAzureCompany.UsersPermissionToCreateGroupsEnabled # : True
UsersPermissionToCreateLOBAppsEnabled = $UAzureCompany.UsersPermissionToCreateLOBAppsEnabled # : True
UsersPermissionToReadOtherUsersEnabled = $UAzureCompany.UsersPermissionToReadOtherUsersEnabled # : True
UsersPermissionToUserConsentToAppEnabled = $UAzureCompany.UsersPermissionToUserConsentToAppEnabled # : False
}
}
}
2 changes: 1 addition & 1 deletion Private/Get-WinO365ExchangeMailboxes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$MailboxStats = $MailboxStatistics | Where-Object { $_.MailboxGuid.Guid -eq $Mailbox.ExchangeGuid.Guid }
$MailboxStatsArchive = $MailboxStatisticsArchive | Where-Object { $_.MailboxGuid.Guid -eq $Mailbox.ArchiveGuid.Guid }

[PSCustomObject][ordered] @{
[PSCustomObject] @{
DisplayName = $Mailbox.DisplayName
UserPrincipalName = $Mailbox.UserPrincipalName
FirstName = $Azure.FirstName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
foreach ($Mailbox in $Mailboxes) {
$UserRules = $InboxRules | Where-Object { ($Mailbox.Identity -eq $_.MailboxOwnerID) -and (($null -ne $_.ForwardTo) -or ($null -ne $_.ForwardAsAttachmentTo) -or ($null -ne $_.RedirectsTo)) }
foreach ($Rule in $UserRules) {
[pscustomobject][ordered] @{
[PSCustomobject] @{
UserPrincipalName = $Mailbox.UserPrincipalName
DisplayName = $Mailbox.DisplayName
RuleName = $Rule.Name
Expand Down
4 changes: 2 additions & 2 deletions Private/Get-WinO365ExchangeMailboxesStatisticsArchive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
)
$PropertiesMailboxStatsArchive = 'DisplayName', 'TotalItemSize', 'ItemCount', 'TotalDeletedItemSize', 'DeletedItemCount', 'OwnerADGuid', 'MailboxGuid'

$MailboxStatisticsArchive = foreach ($_ in $ExchangeMailboxes) {
$MailboxStatisticsArchive = foreach ($Mailbox in $ExchangeMailboxes) {
if ($Mailbox.ArchiveStatus -eq "Active") {
& "Get-$($Prefix)MailboxStatistics" -Identity $_.Guid.Guid -Archive | Select-Object -Property $PropertiesMailboxStatsArchive
& "Get-$($Prefix)MailboxStatistics" -Identity $Mailbox.Guid.Guid -Archive | Select-Object -Property $PropertiesMailboxStatsArchive
}
}
$MailboxStatisticsArchive
Expand Down

0 comments on commit d7faf1f

Please sign in to comment.