Skip to content

Commit de45646

Browse files
authored
!deploy v2.34.0 (#246)
## 2.34.0 - 2019-11-02 * [Issue #245](#245) + [PR #246](#246) - _Thank you, [@devblackops](https://github.com/devblackops)!_ * Added: Optional `-CreateMeetEvent` switch parameter to `New-GSCalendarEvent` to create a Google Meet conference and attach it to the calendar event.
2 parents d9d6b11 + e0ef187 commit de45646

File tree

4 files changed

+62
-54
lines changed

4 files changed

+62
-54
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* [PSGSuite - ChangeLog](#psgsuite---changelog)
2+
* [2.34.0 - 2019-11-02](#2340---2019-11-02)
23
* [2.33.2 - 2019-10-06](#2332---2019-10-06)
34
* [2.33.1 - 2019-10-06](#2331---2019-10-06)
45
* [2.33.0 - 2019-09-26](#2330---2019-09-26)
@@ -103,6 +104,11 @@
103104

104105
# PSGSuite - ChangeLog
105106

107+
## 2.34.0 - 2019-11-02
108+
109+
* [Issue #245](https://github.com/scrthq/PSGSuite/issues/245) + [PR #246](https://github.com/scrthq/PSGSuite/pull/246) - _Thank you, [@devblackops](https://github.com/devblackops)!_
110+
* Added: Optional `-CreateMeetEvent` switch parameter to `New-GSCalendarEvent` to create a Google Meet conference and attach it to the calendar event.
111+
106112
## 2.33.2 - 2019-10-06
107113

108114
* [Issue #242](https://github.com/scrthq/PSGSuite/issues/242)

PSGSuite/PSGSuite.psd1

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'PSGSuite.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '2.33.2'
15+
ModuleVersion = '2.34.0'
1616

1717
# ID used to uniquely identify this module
1818
GUID = '9d751152-e83e-40bb-a6db-4c329092aaec'
@@ -48,7 +48,7 @@
4848
ProcessorArchitecture = 'None'
4949

5050
# Modules that must be imported into the global environment prior to importing this module
51-
RequiredModules = @(@{ModuleName = "Configuration"; ModuleVersion = "1.2.0"})
51+
RequiredModules = @(@{ModuleName = "Configuration"; ModuleVersion = "1.3.1" })
5252

5353
# Assemblies that must be loaded prior to importing this module
5454
RequiredAssemblies = @()

PSGSuite/Public/Calendar/New-GSCalendarEvent.ps1

+50-25
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ function New-GSCalendarEvent {
9797
9898
This is useful for copying another events ExtendedProperties over when creating a new event.
9999
100+
.PARAMETER CreateMeetEvent
101+
Create a Google Meet conference event while creating the calendar event.
102+
103+
This is useful for creating a Google Meet URL which you can send to people for video conferences.
104+
100105
.EXAMPLE
101106
New-GSCalendarEvent "Go to the gym" -StartDate (Get-Date "21:00:00") -EndDate (Get-Date "22:00:00")
102107
@@ -109,76 +114,84 @@ function New-GSCalendarEvent {
109114
[cmdletbinding(DefaultParameterSetName = "AttendeeEmails")]
110115
Param
111116
(
112-
[parameter(Mandatory = $true,Position = 0)]
117+
[parameter(Mandatory,Position = 0)]
113118
[String]
114119
$Summary,
115-
[parameter(Mandatory = $false)]
120+
[parameter()]
116121
[String]
117122
$Description,
118-
[parameter(Mandatory = $false)]
119-
[ValidateScript({if ($_ -match '^[0-9a-v]+$'){$true}else{throw "The characters allowed in the ID are only those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9"}})]
123+
[parameter()]
124+
[ValidateScript( { if ($_ -match '^[0-9a-v]+$') {
125+
$true
126+
}
127+
else {
128+
throw "The characters allowed in the ID are only those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9"
129+
} })]
120130
[ValidateLength(5,1024)]
121131
[String]
122132
$Id,
123-
[parameter(Mandatory = $false,ValueFromPipelineByPropertyName = $true)]
133+
[parameter(ValueFromPipelineByPropertyName)]
124134
[Alias("PrimaryEmail","UserKey","Mail")]
125135
[ValidateNotNullOrEmpty()]
126136
[String[]]
127137
$User = $Script:PSGSuite.AdminEmail,
128-
[parameter(Mandatory = $false,ValueFromPipelineByPropertyName = $true)]
138+
[parameter(ValueFromPipelineByPropertyName)]
129139
[String[]]
130140
$CalendarID = "primary",
131-
[parameter(Mandatory = $false,ParameterSetName = "AttendeeEmails")]
141+
[parameter(ParameterSetName = "AttendeeEmails")]
132142
[String[]]
133143
$AttendeeEmails,
134-
[parameter(Mandatory = $false,ParameterSetName = "AttendeeObjects")]
144+
[parameter(ParameterSetName = "AttendeeObjects")]
135145
[Google.Apis.Calendar.v3.Data.EventAttendee[]]
136146
$Attendees,
137-
[parameter(Mandatory = $false)]
147+
[parameter()]
138148
[String]
139149
$Location,
140-
[parameter(Mandatory = $false)]
150+
[parameter()]
141151
[ValidateSet('default','public','private','confidential')]
142152
[String]
143153
$Visibility,
144-
[parameter(Mandatory = $false)]
154+
[parameter()]
145155
[ValidateSet("Periwinkle","Seafoam","Lavender","Coral","Goldenrod","Beige","Cyan","Grey","Blue","Green","Red")]
146156
[String]
147157
$EventColor,
148158
[parameter()]
149159
[Google.Apis.Calendar.v3.Data.EventReminder[]]
150160
$Reminders,
151-
[parameter(Mandatory = $false)]
161+
[parameter()]
152162
[Alias('DisableReminder')]
153163
[Switch]
154164
$DisableDefaultReminder,
155-
[parameter(Mandatory = $false)]
165+
[parameter()]
156166
[DateTime]
157167
$LocalStartDateTime = (Get-Date),
158-
[parameter(Mandatory = $false)]
168+
[parameter()]
159169
[DateTime]
160170
$LocalEndDateTime = (Get-Date).AddMinutes(30),
161-
[parameter(Mandatory = $false)]
171+
[parameter()]
162172
[String]
163173
$StartDate,
164-
[parameter(Mandatory = $false)]
174+
[parameter()]
165175
[String]
166176
$EndDate,
167-
[parameter(Mandatory = $false)]
177+
[parameter()]
168178
[String]
169179
$UTCStartDateTime,
170-
[parameter(Mandatory = $false)]
180+
[parameter()]
171181
[String]
172182
$UTCEndDateTime,
173-
[parameter(Mandatory = $false)]
183+
[parameter()]
174184
[Hashtable]
175185
$PrivateExtendedProperties,
176-
[parameter(Mandatory = $false)]
186+
[parameter()]
177187
[Hashtable]
178188
$SharedExtendedProperties,
179-
[parameter(Mandatory = $false)]
189+
[parameter()]
180190
[Google.Apis.Calendar.v3.Data.Event+ExtendedPropertiesData]
181-
$ExtendedProperties
191+
$ExtendedProperties,
192+
[parameter()]
193+
[switch]
194+
$CreateMeetEvent
182195
)
183196
Begin {
184197
$colorHash = @{
@@ -229,7 +242,7 @@ function New-GSCalendarEvent {
229242
if (-not $ExtendedProperties) {
230243
$ExtendedProperties = New-Object 'Google.Apis.Calendar.v3.Data.Event+ExtendedPropertiesData' -Property @{
231244
Private__ = (New-Object 'System.Collections.Generic.Dictionary[string,string]')
232-
Shared = (New-Object 'System.Collections.Generic.Dictionary[string,string]')
245+
Shared = (New-Object 'System.Collections.Generic.Dictionary[string,string]')
233246
}
234247
}
235248
elseif (-not $ExtendedProperties.Private__) {
@@ -243,7 +256,7 @@ function New-GSCalendarEvent {
243256
if (-not $ExtendedProperties) {
244257
$ExtendedProperties = New-Object 'Google.Apis.Calendar.v3.Data.Event+ExtendedPropertiesData' -Property @{
245258
Private__ = (New-Object 'System.Collections.Generic.Dictionary[string,string]')
246-
Shared = (New-Object 'System.Collections.Generic.Dictionary[string,string]')
259+
Shared = (New-Object 'System.Collections.Generic.Dictionary[string,string]')
247260
}
248261
}
249262
elseif (-not $ExtendedProperties.Shared) {
@@ -308,9 +321,21 @@ function New-GSCalendarEvent {
308321
DateTime = $LocalEndDateTime
309322
}
310323
}
324+
$verbMsg = $null
325+
if ($CreateMeetEvent) {
326+
$createRequest = New-Object 'Google.Apis.Calendar.v3.Data.CreateConferenceRequest'
327+
$createRequest.RequestId = (New-Guid).ToString('n')
328+
$confData = New-Object 'Google.Apis.Calendar.v3.Data.ConferenceData'
329+
$confData.CreateRequest = $createRequest
330+
$body.ConferenceData = $confData
331+
$verbMsg = ' with Meet conferencing'
332+
}
311333
foreach ($calId in $CalendarID) {
312-
Write-Verbose "Creating Calendar Event '$($Summary)' on calendar '$calId' for user '$U'"
334+
Write-Verbose "Creating Calendar Event '$($Summary)'$($verbMsg) on calendar '$calId' for user '$U'"
313335
$request = $service.Events.Insert($body,$calId)
336+
if ($CreateMeetEvent) {
337+
$request.ConferenceDataVersion = 1
338+
}
314339
$request.Execute() | Add-Member -MemberType NoteProperty -Name 'User' -Value $U -PassThru | Add-Member -MemberType NoteProperty -Name 'CalendarId' -Value $calId -PassThru
315340
}
316341
}

README.md

+4-27
Original file line numberDiff line numberDiff line change
@@ -158,30 +158,7 @@ All other functions are either intact or have an alias included to support backw
158158

159159
[Full CHANGELOG here](https://github.com/scrthq/PSGSuite/blob/master/CHANGELOG.md)
160160

161-
#### 2.33.2 - 2019-10-06
162-
163-
* [Issue #242](https://github.com/scrthq/PSGSuite/issues/242)
164-
* Fixed: Error handling around `[System.Console]::CursorVisible` on `Start-GSDriveFileUpload`, `Wait-GSDriveFileUpload` and `Write-InlineProgress`
165-
* Cleaned up verbose handling on `Stop-GSDriveFileUpload` due to file uploads showing as Failed even though they were successful.
166-
* Miscellaneous
167-
* Updated build.ps1 script for better verbose output
168-
169-
#### 2.33.1 - 2019-10-06
170-
171-
* [Issue #235](https://github.com/scrthq/PSGSuite/issues/235)
172-
* Removed: `Name` parameter from `Start-GSDriveFileUpload` as it was unused in the function and doesnt make sense when uploading an array of files.
173-
* [Issue #238](https://github.com/scrthq/PSGSuite/issues/238)
174-
* Added: `Get-GSDataTransfer` to Get/List current Data Transfers
175-
* [Issue #239](https://github.com/scrthq/PSGSuite/issues/239)
176-
* Removed: `Update-GSResource` `Id` parameter as it was non-applicable (duplicate of `ResourceId` and not writable per API docs)
177-
* Cleaned up function help and examples to match changes
178-
* [Issue #240](https://github.com/scrthq/PSGSuite/issues/240)
179-
* Fixed: `Get-GSCalendar` now properly resolves single calendar metadata retrieval and passes List requests to `Get-GSCalendarSubscription` since the `Calendars` service does not support List requests.
180-
* Miscellaneous
181-
* Updated Google .NET SDKs to latest versions
182-
* Cleaned up build.ps1 script
183-
184-
#### 2.33.0 - 2019-09-26
185-
186-
* [Issue #236](https://github.com/scrthq/PSGSuite/issues/236)
187-
* Fixed: Custom converter for Configuration metadata defaults to `ConvertTo-SecureString` as the preferred function instead of the custom `Secure`. `Secure` is still supported for backwards compatibility.
161+
#### 2.34.0 - 2019-11-02
162+
163+
* [Issue #245](https://github.com/scrthq/PSGSuite/issues/245) + [PR #246](https://github.com/scrthq/PSGSuite/pull/246) - _Thank you, [@devblackops](https://github.com/devblackops)!_
164+
* Added: Optional `-CreateMeetEvent` switch parameter to `New-GSCalendarEvent` to create a Google Meet conference and attach it to the calendar event.

0 commit comments

Comments
 (0)