Skip to content

Latest commit

 

History

History
162 lines (124 loc) · 3.47 KB

Remove-CWCSessionNote.md

File metadata and controls

162 lines (124 loc) · 3.47 KB
external help file ConnectWiseControlAPI-help.xml
Module Name ConnectWiseControlAPI
online version https://github.com/christaylorcodes/ConnectWiseControlAPI
schema 2.0.0

Remove-CWCSessionNote

SYNOPSIS

Removes notes from a session.

SYNTAX

ById (Default)

Remove-CWCSessionNote -GUID <Guid> -NoteEventID <Guid[]> [-Group <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

All

Remove-CWCSessionNote -GUID <Guid> [-All] [-Group <String[]>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Deletes notes (AddedNote events) by adding a DeletedEvent correlated to each note, the same way the ScreenConnect web UI removes a note. The user needs the RemoveNote permission in -Group.

-NoteEventID removes the given notes (without checking them first). -All reads the session and removes every note still on it, skipping notes that are already deleted.

EXAMPLES

EXAMPLE 1

Remove-CWCSessionNote -GUID $SessionID -All

Removes every note on the session, prompting for each one.

EXAMPLE 2

$Notes = (Get-CWCSessionDetail -GUID $SessionID -Include Events).Events | Where-Object EventType -eq 32
$Notes | Where-Object Data -like 'Rebooted*' | ForEach-Object {
    Remove-CWCSessionNote -GUID $SessionID -NoteEventID $_.EventID -Confirm:$false
}

PARAMETERS

-GUID

Session ID.

Type: Guid
Parameter Sets: (All)
Aliases: SessionID

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoteEventID

Event ID of each note to remove (the EventID of an AddedNote event in Get-CWCSessionDetail).

Type: Guid[]
Parameter Sets: ById
Aliases: EventID

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-All

Remove every note on the session.

Type: SwitchParameter
Parameter Sets: All
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Group

Session group containing the session: a name, or the path parts of a nested group. Defaults to 'All Machines'.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: All Machines
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Requires Connect-CWC -Credentials (the RESTful API Manager extension cannot delete notes). Based on the design in #27 by CitybookServicesLTD. Author: Chris Taylor

RELATED LINKS

https://github.com/christaylorcodes/ConnectWiseControlAPI