Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #2725

Merged
merged 6 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/PublishGitHubPages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
New-M365DSCCmdletDocumentation
- name: Commit files # commit the output folder
if: always()
shell: pwsh
run: |
git config --local user.email "[email protected]"
git config --local user.name "Nik Charlebois"
Expand All @@ -29,7 +30,7 @@ jobs:
git commit -m "Updated Resources and Cmdlet documentation pages"
git push
$SHA = git rev-parse HEAD
echo "::set-output name=commitid::$SHA"
echo "commitid=$SHA" >> $env:GITHUB_OUTPUT

deploy:
needs: GenerateResource
Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,25 @@

# UNRELEASED

* DRG
* IntuneASRRulesPolicyWindows10
* Corrects possible values for parameter OfficeCommunicationAppsLaunchChildProcess
FIXES [#2730](https://github.com/microsoft/Microsoft365DSC/issues/2730)
* TeamsIPPhonePolicy
* Added descriptions to the resource parameters
* Limited possible parameter values where required
FIXES [#2722](https://github.com/microsoft/Microsoft365DSC/issues/2722)
* TeamsMeetingPolicy
* Deprecating RecordingStorageMode parameter, which is no longer available.
FIXES [#2723](https://github.com/microsoft/Microsoft365DSC/issues/2723)
* TeamsShiftsPolicy
* Added descriptions to the resource parameters
* Limited possible parameter values where required
FIXES [#2722](https://github.com/microsoft/Microsoft365DSC/issues/2722)
* TeamsFilesPolicy
* Added descriptions to the resource parameters
* Limited possible parameter values where required
FIXES [#2722](https://github.com/microsoft/Microsoft365DSC/issues/2722)
* DRG
* Various fixes for Graph and Intune resources automation
* Migrated to new schema including description
* Added support to generate parameter descriptions automatically from schema
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ function Get-TargetResource
$Identity,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$NativeFileEntryPoints,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$SPChannelFilesTab,

Expand Down Expand Up @@ -98,10 +100,12 @@ function Set-TargetResource
$Identity,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$NativeFileEntryPoints,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$SPChannelFilesTab,

Expand Down Expand Up @@ -209,10 +213,12 @@ function Test-TargetResource
$Identity,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$NativeFileEntryPoints,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$SPChannelFilesTab,

Expand Down Expand Up @@ -316,7 +322,7 @@ function Export-TargetResource
$ManagedIdentity
)

$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -354,11 +360,11 @@ function Export-TargetResource
}
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Identity = $config.Identity
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
Identity = $config.Identity
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[ClassVersion("1.0.0.0"), FriendlyName("TeamsFilesPolicy")]
class MSFT_TeamsFilesPolicy : OMI_BaseResource
{
[Key, Description("")] String Identity;
[Write, Description("")] String NativeFileEntryPoints;
[Write, Description("")] String SPChannelFilesTab;
[Key, Description("Specifies the policy instance name")] String Identity;
[Write, Description("Specifies whether users see the options to upload files from OneDrive for Business, other cloud storage services configured for the user account, and SharePoint Online"), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String NativeFileEntryPoints;
[Write, Description("Specifies whether users see the Teams Files channel tab in any channel or in Teams chat."), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String SPChannelFilesTab;
[Write, Description("Present ensures the instance exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the workload's Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ function Get-TargetResource
$Identity,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$AllowBetterTogether,

[Parameter()]
[ValidateSet('Enabled', 'EnabledUserOverride', 'Disabled')]
[System.String]
$AllowHomeScreen,

Expand All @@ -29,10 +31,12 @@ function Get-TargetResource
$HotDeskingIdleTimeoutInMinutes,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$SearchOnCommonAreaPhoneMode,

[Parameter()]
[ValidateSet('UserSignIn', 'CommonAreaPhoneSignIn', 'MeetingSignIn')]
[System.String]
$SignInMode,

Expand Down Expand Up @@ -123,10 +127,12 @@ function Set-TargetResource
$Identity,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$AllowBetterTogether,

[Parameter()]
[ValidateSet('Enabled', 'EnabledUserOverride', 'Disabled')]
[System.String]
$AllowHomeScreen,

Expand All @@ -143,10 +149,12 @@ function Set-TargetResource
$HotDeskingIdleTimeoutInMinutes,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$SearchOnCommonAreaPhoneMode,

[Parameter()]
[ValidateSet('UserSignIn', 'CommonAreaPhoneSignIn', 'MeetingSignIn')]
[System.String]
$SignInMode,

Expand Down Expand Up @@ -254,10 +262,12 @@ function Test-TargetResource
$Identity,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$AllowBetterTogether,

[Parameter()]
[ValidateSet('Enabled', 'EnabledUserOverride', 'Disabled')]
[System.String]
$AllowHomeScreen,

Expand All @@ -274,10 +284,12 @@ function Test-TargetResource
$HotDeskingIdleTimeoutInMinutes,

[Parameter()]
[ValidateSet('Enabled', 'Disabled')]
[System.String]
$SearchOnCommonAreaPhoneMode,

[Parameter()]
[ValidateSet('UserSignIn', 'CommonAreaPhoneSignIn', 'MeetingSignIn')]
[System.String]
$SignInMode,

Expand Down Expand Up @@ -381,7 +393,7 @@ function Export-TargetResource
$ManagedIdentity
)

$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -419,11 +431,11 @@ function Export-TargetResource
}
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Identity = $config.Identity
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
Identity = $config.Identity
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[ClassVersion("1.0.0.0"), FriendlyName("TeamsIPPhonePolicy")]
class MSFT_TeamsIPPhonePolicy : OMI_BaseResource
{
[Key, Description("")] String Identity;
[Write, Description("")] String AllowBetterTogether;
[Write, Description("")] String AllowHomeScreen;
[Write, Description("")] Boolean AllowHotDesking;
[Write, Description("")] String Description;
[Write, Description("")] UInt64 HotDeskingIdleTimeoutInMinutes;
[Write, Description("")] String SearchOnCommonAreaPhoneMode;
[Write, Description("")] String SignInMode;
[Key, Description("Specifies the policy instance name")] String Identity;
[Write, Description("Determines whether Better Together mode is enabled, phones can lock and unlock in an integrated fashion when connected to their Windows PC running a 64-bit Teams desktop client."), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String AllowBetterTogether;
[Write, Description("Determines whether the Home Screen feature of the Teams IP Phones is enabled."), ValueMap{"Enabled","EnabledUserOverride","Disabled"}, Values{"Enabled","EnabledUserOverride","Disabled"}] String AllowHomeScreen;
[Write, Description("Determines whether hot desking mode is enabled.")] Boolean AllowHotDesking;
[Write, Description("Specifies the description of the policy")] String Description;
[Write, Description("Determines the idle timeout value in minutes for the signed in user account. When the timeout is reached, the account is logged out.")] UInt64 HotDeskingIdleTimeoutInMinutes;
[Write, Description("Determines whether a user can search the Global Address List in Common Area Phone Mode."), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String SearchOnCommonAreaPhoneMode;
[Write, Description("Determines the sign in mode for the device when signing in to Teams."), ValueMap{"UserSignIn","CommonAreaPhoneSignIn","MeetingSignIn"}, Values{"UserSignIn","CommonAreaPhoneSignIn","MeetingSignIn"}] String SignInMode;
[Write, Description("Present ensures the instance exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the workload's Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function Get-TargetResource

[Parameter()]
[System.UInt32]
[ValidateRange(-1,99999)]
[ValidateRange(-1, 99999)]
$NewMeetingRecordingExpirationDays,

[Parameter()]
Expand All @@ -237,6 +237,7 @@ function Get-TargetResource
[System.String]
$QnAEngagementMode,

#DEPRECATED
[Parameter()]
[System.String]
[ValidateSet('Stream', 'OneDriveForBusiness')]
Expand Down Expand Up @@ -320,6 +321,11 @@ function Get-TargetResource
Add-M365DSCTelemetryEvent -Data $data
#endregion

# Warning for deprecated parameters
if ($PSBoundParameters.ContainsKey('RecordingStorageMode'))
{
Write-Warning 'RecordingStorageMode is deprecated. Please remove this parameter from your configuration.'
}

$nullReturn = $PSBoundParameters
$nullReturn.Ensure = 'Absent'
Expand Down Expand Up @@ -390,7 +396,8 @@ function Get-TargetResource
NewMeetingRecordingExpirationDays = $policy.NewMeetingRecordingExpirationDays
PreferredMeetingProviderForIslandsMode = $policy.PreferredMeetingProviderForIslandsMode
QnAEngagementMode = $policy.QnAEngagementMode
RecordingStorageMode = $policy.RecordingStorageMode
#DEPRECATED
#RecordingStorageMode = $policy.RecordingStorageMode
RoomPeopleNameUserOverride = $policy.RoomPeopleNameUserOverride
ScreenSharingMode = $policy.ScreenSharingMode
SpeakerAttributionMode = $policy.SpeakerAttributionMode
Expand Down Expand Up @@ -643,7 +650,7 @@ function Set-TargetResource

[Parameter()]
[System.UInt32]
[ValidateRange(-1,99999)]
[ValidateRange(-1, 99999)]
$NewMeetingRecordingExpirationDays,

[Parameter()]
Expand All @@ -655,6 +662,7 @@ function Set-TargetResource
[System.String]
$QnAEngagementMode,

#DEPRECATED
[Parameter()]
[System.String]
[ValidateSet('Stream', 'OneDriveForBusiness')]
Expand Down Expand Up @@ -738,6 +746,12 @@ function Set-TargetResource
$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
-InboundParameters $PSBoundParameters

# Warning for deprecated parameters
if ($PSBoundParameters.ContainsKey('RecordingStorageMode'))
{
Write-Warning 'RecordingStorageMode is deprecated. Please remove this parameter from your configuration.'
}

$CurrentValues = Get-TargetResource @PSBoundParameters

$SetParameters = $PSBoundParameters
Expand All @@ -748,6 +762,10 @@ function Set-TargetResource
$SetParameters.Remove('CertificateThumbprint') | Out-Null
$SetParameters.Remove('Verbose') | Out-Null # Needs to be implicitly removed for the cmdlet to work

# Remove deprecated parameters
#DEPRECATED
$SetParameters.Remove('RecordingStorageMode') | Out-Null

if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent')
{
Write-Verbose -Message "Creating a new Teams Meeting Policy {$Identity}"
Expand Down Expand Up @@ -778,7 +796,6 @@ function Set-TargetResource
}
if ($SetParameters.AllowCloudRecording -eq $false )
{
$SetParameters.Remove('RecordingStorageMode')
$SetParameters.Remove('AllowRecordingStorageOutsideRegion')
}
Set-CsTeamsMeetingPolicy @SetParameters
Expand Down Expand Up @@ -1017,7 +1034,7 @@ function Test-TargetResource

[Parameter()]
[System.UInt32]
[ValidateRange(-1,99999)]
[ValidateRange(-1, 99999)]
$NewMeetingRecordingExpirationDays,

[Parameter()]
Expand All @@ -1029,6 +1046,7 @@ function Test-TargetResource
[System.String]
$QnAEngagementMode,

#DEPRECATED
[Parameter()]
[System.String]
[ValidateSet('Stream', 'OneDriveForBusiness')]
Expand Down Expand Up @@ -1106,6 +1124,12 @@ function Test-TargetResource
Add-M365DSCTelemetryEvent -Data $data
#endregion

# Warning for deprecated parameters
if ($PSBoundParameters.ContainsKey('RecordingStorageMode'))
{
Write-Warning 'RecordingStorageMode is deprecated. Please remove this parameter from your configuration.'
}

Write-Verbose -Message "Testing configuration of Team Meeting Policy {$Identity}"

$CurrentValues = Get-TargetResource @PSBoundParameters
Expand All @@ -1122,6 +1146,9 @@ function Test-TargetResource
# The AllowIPVideo is temporarly not working, therefore we won't check the value.
$ValuesToCheck.Remove('AllowIPVideo') | Out-Null

# Remove deprecated parameters
#DEPRECATED
$ValuesToCheck.Remove('RecordingStorageMode') | Out-Null

$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
-Source $($MyInvocation.MyCommand.Source) `
Expand Down
Binary file not shown.
Loading