Set-DisableNotificationsForWorkspaceUser

Prev Next

Summary

Turns a user's notifications off.

Set-DisableNotificationsForWorkspaceUser
    -UserId

Returns a workspace user object.

Parameters

Parameter

Type

Required?

Notes

UserId

String

Yes

The user id.

Examples

Turn a user's notifications off

$userId = "08077d23-bb13-4727-b76d-ab8fdf9d870f"

# Disable notifications for this user
$user =  Set-DisableNotificationsForWorkspaceUser -UserId $userId

Write-Output "Updated notifications for user '$($user.FullName)' (Id: #$($user.Id), Roles: $($user.Roles), Notifications Enabled: $($user.NotificationsEnabled))"

# For debug purposes, convert the entity to output as JSON so we can see the available fields
$jsonOutput = $user | ConvertTo-Json -Depth 10

Write-Output ""
Write-Output "JSON Results:"

# Output the JSON results
Write-Output $jsonOutput

Execution results:

Updated notifications for user 'Max Miller' (Id: #08077d23-bb13-4727-b76d-ab8fdf9d870f, Roles: Organization User;Organization Administrator, Notifications Enabled: False)

JSON Results:
{
  "Id": "08077d23-bb13-4727-b76d-ab8fdf9d870f",
  "Email": "mmiller@agilityblue.com",
  "FirstName": "Max",
  "LastName": "Miller",
  "FullName": "Max Miller",
  "Active": true,
  "Deleted": false,
  "IsSystemAccount": false,
  "IsTeamAccount": false,
  "PrimaryColor": "#003366",
  "OrganizationId": 1020,
  "OrganizationName": "Sadie Blue Software",
  "TimeZoneIdentifier": "Central Standard Time",
  "Roles": "Organization User;Organization Administrator",
  "NotificationsEnabled": false,
  "NumberOfProjectsCreated": 0,
  "NumberOfProjectsOwned": 0,
  "NumberOfTasksCreated": 1,
  "NumberOfTasksAssigned": 1,
  "NumberOfTasksCompleted": 1,
  "NumberOfNotificationRules": 0,
  "CreatedOn": "2025-03-06T10:18:00+00:00"
}