Smartsheet

Syntax

Add-SmartsheetAttachment -Id <UInt64> -Path <String> [-description <String>] [-name <String>] [<CommonParameters>]

Add-SmartsheetAttachment -Id <UInt64> [-Url <String>] [-Type <String>] [-subType <String>] [-description <String>] [-name <String>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Smartsheet Id. true true (ByPropertyName) 0
-Path String Path to the file to attach. true false
-Url String URL to the cloud based resource. false false
-Type String The type of URL. false false LINK
-subType String Subtype of URL. Only valid for EGNYTE and GOOGLE_DRIVE types. false false DOCUMENT
-description String A description of the attachment. false false
-name String The name of the attachment. false false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A Smartsheet attachment object.

Syntax

Add-SmartSheetCellImage [-Id] <UInt64> [-rowId] <UInt64> [-columnId] <UInt64> [-Path] <String> [[-altText] <String>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id UInt64 Smartsheet Id true true (ByPropertyName) 0
-rowId UInt64 Smartsheet row Id. true false 0
-columnId UInt64 Smartsheet column Id. true false 0
-Path String Path tot he local image file. true false
-altText String Alternative text associated with the image. false false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Smartsheet Row object that contains the image.

Syntax

Add-SmartsheetColumn -Id <UInt64> -column <PSObject> [-PassThru] [<CommonParameters>]

Add-SmartsheetColumn -Id <UInt64> -Index <Int32> [-title <String>] [-description <String>] [-type <String>] [-formula <PSObject>] [-hidden <Boolean>] [-autoNumberFormat <PSObject>] [-contactOptions <PSObject>] [-format <String>] [-locked <Boolean>] [-options <String[]>] [-symbol <String>] [-systemColumnType <String>] [-validation <Boolean>] [-width <Int32>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Id of the Smartsheet containing the column. true true (ByPropertyName) 0
-column PSObject A Smartsheet column object. Cannot be used with column property parameters. true false
-Index Int32 Index if the column to update. true false 0
-title String Column Title false false
-description String Column description false false
-type String Column type false false
-formula PSObject The formula for a column, if set, for instance =data@row. false false
-hidden Boolean Indicates visibility of the column. false false False
-autoNumberFormat PSObject Object that describes how the the System Column type of "AUTO_NUMBER" is auto-generated. false false
-contactOptions PSObject Array of ContactOption objects to specify a pre-defined list of values for the column. Column type must be CONTACT_LIST.
The contact option object is in the form:
email = {email address}
name = {contact name}
false false
-format String Format string. false false
-locked Boolean Indicates whether the column is locked. A value of true indicates that the column has been locked by the sheet owner or the admin. false false False
-options String[] Array of the options available for the column. false false
-symbol String When applicable for CHECKBOX or PICKLIST column types. false false
-systemColumnType String If this is a system column what type is it. false false
-validation Boolean Indicates whether validation has been enabled for the column (value = true). false false False
-width Int32 Display width of the column in pixels. false false 0
-PassThru SwitchParameter Return the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An updated column object. if PassThru is provided returns the updated sheet object.

Examples

EXAMPLE 1
To add a new colum to a Smartsheet.
PS> $newColumn = $Sheet | Add-SmartsheetColumn -title "Title" -type:TEXT_NUMBER -description 'My new column'
EXAMPLE 2
To insert a new column at position 4 (columns after position 4 are shifted to the right and their index incremented).
PS> $newColumn = $Sheet | Add-SmartsheetColumn -title "Asset" -type:TEXT_NUMBER -Description "Fixed asset" -index 4
EXAMPLE 3
Add a new column with contact objects.
PS> $contacts = @(
    @{
        email = "johndoe@example.com"
        name = "John Doe"
    },
    @{
        email = "janedoe@example.com"
        name = 'Jane Doe
    }
)
PS> $newColumn = $Sheet | Add-SmartsheetColumn -title "EmployeeName" -type:TEXT_NUMBER -contactOption $contacts

Top of page

Syntax

Add-SmartsheetColumns [-Id] <UInt64> [-columns] <PSObject[]> [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Id of the smartsheet to add columns to. true true (ByPropertyName) 0
-columns PSObject[] An array of smartsheet columns. true false
-PassThru SwitchParameter Return the updated Sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of the newly added columns. if PassThru is provided returns the updated sheet object.

Syntax

Add-SmartsheetComment [-Id] <UInt64> [-discussionId] <UInt64> [-text] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Smartsheet Id. true true (ByPropertyName) 0
-discussionId UInt64 The discussion Id. true false 0
-text String The test of the new comment. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet comment object.

Syntax

Add-SmartsheetDiscussion [-Id] <UInt64> [-text] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The smartsheet Id. true true (ByPropertyName) 0
-text String The text of the comment. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A Smartsheet Discussion object.

Syntax

Add-SmartsheetRow -Id <UInt64> -Row <PSObject> [-location <String>] [-siblingRowId <String>] [-PassThru] [<CommonParameters>]

Add-SmartsheetRow -Id <UInt64> [-expanded <Boolean>] [-format <String>] [-cells <PSObject[]>] [-locked <Boolean>] [-location <String>] [-siblingRowId <String>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Id of the sheet to add row to. true true (ByPropertyName) 0
-Row PSObject A row object to add to the sheet. Cannot be used with individual row properties. true false
-expanded Boolean Indicates whether the row is expanded or collapsed. false false False
-format String Format descriptor. Use New-SmartsheetFormatString to create format descriptors. false false
-cells PSObject[] Cells belonging to the row. false false
-locked Boolean Indicates whether the row is locked. false false False
-location String The location to insert the row. Default is 'bottom'. false false bottom
-siblingRowId String If location is above of below the row ID to insert the ro above or below. Required when specifying 'above' or 'below' for location. false false
-PassThru SwitchParameter REturn the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • The newly added row object. if PassThru is specified, return the updated sheet object.

Syntax

Add-SmartsheetRowDiscussion [-id] <UInt64> [-rowId] <UInt64> [-text] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id sheetId UInt64 The smartsheet Id. true true (ByPropertyName) 0
-rowId UInt64 The Row Id. true false 0
-text String The text of the comment. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet discussion object.

Syntax

Add-SmartsheetRows [-Id] <UInt64> [-Rows] <PSObject[]> [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Id of the smartsheet to add the rows to. true false 0
-Rows PSObject[] An array of smartsheet row objects. true false
-PassThru SwitchParameter Return then update sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of the newly created rows. If PassThru is specified returns the updated sheet object.

Syntax

Add-SmartsheetShare -Id <UInt64> -accessLevel <String> [<CommonParameters>]

Add-SmartsheetShare -Id <UInt64> -accessLevel <String> [-sendEmail] [-email <String>] [-subject <String>] [-message <String>] [-ccMe] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Sheet id of the sheet to share. true true (ByPropertyName) 0
-accessLevel String Access level to grant to the user. true false
-sendEmail SwitchParameter Send an email to the user you are sharing the sheet with. false false False
-email String Email address of the person you are sharing the sheet with. false false
-subject String Subject of the email. false false
-message String Body of the email. false false
-ccMe SwitchParameter send a carbon copy to the sender. false false False

Syntax

Add-SmartsheetWorkspace -Name <String> [-Folders <PSObject[]>] [-Reports <PSObject[]>] [-Sheets <PSObject[]>] [-Sights <PSObject[]>] [-Templates <PSObject[]>] [-ExcludeCellLinksRemap] [-ExcludeReportsRemap] [-ExcludeSheetHyperlinkRemap] [-ExcludeSightsRemap] [<CommonParameters>]

Add-SmartsheetWorkspace -Name <String> [-Folders <PSObject[]>] [-Reports <PSObject[]>] [-Sheets <PSObject[]>] [-Sights <PSObject[]>] [-Templates <PSObject[]>] [-IncludeAll] [-ExcludeCellLinksRemap] [-ExcludeReportsRemap] [-ExcludeSheetHyperlinkRemap] [-ExcludeSightsRemap] [<CommonParameters>]

Add-SmartsheetWorkspace -Name <String> [-Folders <PSObject[]>] [-Reports <PSObject[]>] [-Sheets <PSObject[]>] [-Sights <PSObject[]>] [-Templates <PSObject[]>] [-IncludeAttachments] [-IncludeBrands] [-IncludeCellLinks] [-IncludeData] [-IncludeDiscussions] [-IncludeFilters] [-IncludeForms] [-IncludeRuleRecipients] [-IncludeRules] [-IncludeShares] [-ExcludeCellLinksRemap] [-ExcludeReportsRemap] [-ExcludeSheetHyperlinkRemap] [-ExcludeSightsRemap] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Name String The name of the Workspace. true false
-Folders PSObject[] An array of folder objects to add to the Workspace. false false
-Reports PSObject[] An array of report objects to add to the Workspace. false false
-Sheets PSObject[] An array of sheet objects to add to the Workspace. false false
-Sights PSObject[] An array dashboards to add to the Workspace. false false
-Templates PSObject[] An array templates to add to the Workspace. false false
-IncludeAll SwitchParameter Include all of the below elements in the Workspace. false false False
-IncludeAttachments SwitchParameter Include attachments. false false False
-IncludeBrands SwitchParameter Include brands. false false False
-IncludeCellLinks SwitchParameter Include cell links. false false False
-IncludeData SwitchParameter Include data. false false False
-IncludeDiscussions SwitchParameter Include discussions. false false False
-IncludeFilters SwitchParameter Include filters. false false False
-IncludeForms SwitchParameter Include forms. false false False
-IncludeRuleRecipients SwitchParameter Include recipients. false false False
-IncludeRules SwitchParameter Include rules. false false False
-IncludeShares SwitchParameter Include shares. false false False
-ExcludeCellLinksRemap SwitchParameter Exclude cell link remaps. false false False
-ExcludeReportsRemap SwitchParameter Exclude reports remaps. false false False
-ExcludeSheetHyperlinkRemap SwitchParameter Exclude Sheet Hyperlink remaps. false false False
-ExcludeSightsRemap SwitchParameter Exclude dashboard remaps. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Object containing a Workspace object for the newly created workspace.

Syntax

Add-SmartsheetWorkspaceFolder [-Id] <UInt64> [-Name] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id WorkspaceId UInt64 The Id of the workspace to create the folder in. true true (ByPropertyName) 0
-Name String The name of the folder. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An object containing the newly created folder.

Note

This function can only create top level folder. To create a subfolder us the Add-SmartsheetFolder function.

Syntax

Copy-Smartsheet -Id <UInt64> [-newSheetName <String>] [-includeAll] [-includeAttachments] [-includeCellLinks] [-includeFormatting] [-includeFilters] [-includeForms] [-includeRuleRecipients] [-includeRules] [-IncludeShares] [-excludeSheetHyperlinks] [-passThru] [<CommonParameters>]

Copy-Smartsheet -Id <UInt64> [-newSheetName <String>] [-containerId <String>] [-containerType <String>] [-includeAll] [-includeAttachments] [-includeCellLinks] [-includeFormatting] [-includeFilters] [-includeForms] [-includeRuleRecipients] [-includeRules] [-IncludeShares] [-excludeSheetHyperlinks] [-passThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 The sheet Id of the sheet to be copied. true true (ByPropertyName) 0
-newSheetName String The name of the new sheet. false false
-containerId String The folder or workspace Id to copy the sheet to. false false
-containerType String One of 'folder', workspace' or 'home' if containerType - 'home' containerId must be omitted.
'home' is the default value is omitted.
false false home
-includeAll SwitchParameter Include all elements of the sheet false false False
-includeAttachments SwitchParameter Include attachments false false False
-includeCellLinks SwitchParameter Include cell links. false false False
-includeFormatting SwitchParameter Include formatting false false False
-includeFilters SwitchParameter Include filters false false False
-includeForms SwitchParameter Include forms false false False
-includeRuleRecipients SwitchParameter Include rule recipients false false False
-includeRules SwitchParameter Include rules. false false False
-IncludeShares SwitchParameter Include Shares false false False
-excludeSheetHyperlinks SwitchParameter Exclude sheet hyperlinks. false false False
-passThru SwitchParameter Returns the copied Smartsheet object. false false False

Syntax

Copy-SmartsheetAttachments [-Id] <String> [-targetSheetId] <String> [-tempDir] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sourceSheetId String true true (ByPropertyName)
-targetSheetId String The Target Smartsheet Id. true false
-tempDir String The temporary directory to save the files to. (Linux/Mac = /tmp, Windows = TEMP environment variable.) true false

Syntax

Copy-SmartsheetDiscussions [-Id] <UInt64> [-targetSheetId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sourceSheetId UInt64 The source Smartsheet Id. true true (ByPropertyName) 0
-targetSheetId UInt64 The Target Smartsheet Id. true false 0

Syntax

Copy-SmartSheetRows -Id <UInt64> -targetSheetId <UInt64> -rowIds <UInt64[]> [-ignoreRowsNotFound] [<CommonParameters>]

Copy-SmartSheetRows -Id <UInt64> -targetSheetId <UInt64> -rowIds <UInt64[]> [-includeAll] [-ignoreRowsNotFound] [<CommonParameters>]

Copy-SmartSheetRows -Id <UInt64> -targetSheetId <UInt64> -rowIds <UInt64[]> [-includeAttachments] [-includeChildren] [-includeDiscussions] [-ignoreRowsNotFound] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sourceSheetId UInt64 The source Sheet Id true true (ByPropertyName) 0
-targetSheetId UInt64 The Target sheet Id. true false 0
-rowIds UInt64[] An array of row Ids to copy to the target sheet. true false
-includeAll SwitchParameter include all of 'attachments', 'children' and 'discussions' false false False
-includeAttachments SwitchParameter Include row attachments. false false False
-includeChildren SwitchParameter Include Child rows.
If specified, any child rows of the rows specified in the request are also copied to the destination sheet,
and parent-child relationships amongst rows are preserved within the destination sheet; if not specified,
only the rows specified in the request are copied.
false false False
-includeDiscussions SwitchParameter Include row discussions. false false False
-ignoreRowsNotFound SwitchParameter If specified, row Ids that do not exist within the source sheet does not cause an error response. If omitted,
specifying row Ids that do not exist within the source sheet causes an error response (and no rows are copied).
false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An object containing the row mappings.

Syntax

Copy-SmartsheetShares [-Id] <UInt64> [-targetSheetId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sourceSheetId UInt64 true true (ByPropertyName) 0
-targetSheetId UInt64 The Target Smartsheet Id true false 0

Syntax

Copy-SmartsheetWorkspace -Id <UInt64> -NewName <String> [-DestinationId <UInt64>] [-DestinationType <String>] [-ExcludeCellLinksRemap] [-ExcludeReportsRemap] [-ExcludeSheetHyperlinkRemap] [-ExcludeSightsRemap] [<CommonParameters>]

Copy-SmartsheetWorkspace -Id <UInt64> -NewName <String> [-DestinationId <UInt64>] [-DestinationType <String>] [-IncludeAll] [-ExcludeCellLinksRemap] [-ExcludeReportsRemap] [-ExcludeSheetHyperlinkRemap] [-ExcludeSightsRemap] [<CommonParameters>]

Copy-SmartsheetWorkspace -Id <UInt64> -NewName <String> [-DestinationId <UInt64>] [-DestinationType <String>] [-IncludeAttachments] [-IncludeBrands] [-IncludeCellLinks] [-IncludeData] [-IncludeDiscussions] [-IncludeFilters] [-IncludeForms] [-IncludeRuleRecipients] [-IncludeRules] [-IncludeShares] [-ExcludeCellLinksRemap] [-ExcludeReportsRemap] [-ExcludeSheetHyperlinkRemap] [-ExcludeSightsRemap] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id WorkspaceId UInt64 The Id of the workspace to copy. true true (ByPropertyName) 0
-NewName String The new name of the workspace. true false
-DestinationId UInt64 The Id of the destination container (when copying or moving a sheet or a folder). Required if destinationType is "folder" or "workspace".
If destinationType is "home", this value must be null.
false false 0
-DestinationType String Type of the destination container. false false
-IncludeAll SwitchParameter Include all of the below elements in the Workspace. false false False
-IncludeAttachments SwitchParameter Include attachments. false false False
-IncludeBrands SwitchParameter Include brands. false false False
-IncludeCellLinks SwitchParameter Include cell links. false false False
-IncludeData SwitchParameter Include data. false false False
-IncludeDiscussions SwitchParameter Include discussions. false false False
-IncludeFilters SwitchParameter Include filters. false false False
-IncludeForms SwitchParameter Include forms. false false False
-IncludeRuleRecipients SwitchParameter Include recipients. false false False
-IncludeRules SwitchParameter Include rules. false false False
-IncludeShares SwitchParameter Include shares. false false False
-ExcludeCellLinksRemap SwitchParameter Exclude cell link remaps. false false False
-ExcludeReportsRemap SwitchParameter Exclude reports remaps. false false False
-ExcludeSheetHyperlinkRemap SwitchParameter Exclude Sheet Hyperlink remaps. false false False
-ExcludeSightsRemap SwitchParameter Exclude dashboard remaps. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Object containing a workspace object for the new workspace destination.

Syntax

Export-SmartSheet -InputObject <PSObject> -SheetName <String> [-headerRow <Int32>] [-primaryColumn <Int32>] [<CommonParameters>]

Export-SmartSheet -InputObject <PSObject> -SheetName <String> [-FolderId <UInt64>] [-headerRow <Int32>] [-primaryColumn <Int32>] [<CommonParameters>]

Export-SmartSheet -InputObject <PSObject> -SheetName <String> [-WorkspaceId <UInt64>] [-headerRow <Int32>] [-primaryColumn <Int32>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-InputObject PSObject Array of object to create the Smartsheet from. true true (ByValue)
-SheetName String The name of the new Smartsheet. true false
-FolderId UInt64 The folder ID of the folder to create the Smartsheet in. This can either be a folder from the home location or a folder in a Workspace.
Use the Get-SmartsheetFolder or Get-SmartsheetWorkspaceFolders to get the Folder Id.
false false 0
-WorkspaceId UInt64 The workspace to create the Smartsheet in. Use the Get-SmartsheetWorkspaces function to get the Workspace Id.
This will create the sheet in the root of the workspace. To create a sheet in a folder in a workspace,
specify the folder ID of the folder inside the workspace.
At this time you cannot get a recursive list of all folders in a workspace, You can get a recursive list of all subfolders of a workspace folder.
Use the Get-SmartsheetFolders function, specifying the top level folder ID and the Recursive property.
false false 0
-headerRow Int32 Row to use for column headers.
All rows above this row are ignored.
If omitted the first row will be used. A value of -1 will create default headers in the form Column1, Column1, etc.
false false 0
-primaryColumn Int32 The column to use as the primary column. default is the 1st column. false false 0

Note

As mentioned this function ALWAYS creates a new sheet even if the name already exists. Name IS NOT the unique identifyer in smartsheet, the sheet ID is.
If you want to update a shee use the Update-SmartSheet funcction.

Examples

EXAMPLE 1
Create a new sheet in the home folder.
$ObjectArray | Export-Smartsheet -SheetName "MyNewSheet"
EXAMPLE 2
Create a new sheet in the folder.
$Folder = Get-SmartsheetHomeFolders -Recurse | Where-object {$_.FullName like "Inventory/Westcoast"}
$objectArray | Export-Smartsheet -SheetName "MyNewSheet" -folder 'myfolder1/myfolder2'
EXAMPLE 3
Create a new sheet in a workspace folder.
$Workspace = Get-SmartsheetWorkspaces | Where-Object {$_.Name -eq 'Accounting'}
$APFolder = Get-SMartsheetWorkspaceFolders -WorkspaceId $Workspace.Id | Where-Object ($_.Name -eq 'Accounts Payable')
$PaymentsFolder = Get-SmartsheetFolders -FolderId $APFolder.Id -Recurse | Where-Object {$_.FullName -eq "Microsoft/Payments"}
$ObjectArray | Export-Smartsheet -Sheetname 'July Payments' -folder $PaymentsFolder.Id

Top of page

Syntax

Export-SmartsheetRows [[-InputObject] <PSObject>] [-sheetId] <UInt64> [-blankRowAbove] [[-title] <String>] [[-titleFormat] <String>] [-includeHeaders] [[-headerFormat] <String>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-InputObject PSObject An array of Powershell objects. false true (ByValue)
-sheetId UInt64 The Smartsheet ID to put the data in. true false 0
-blankRowAbove SwitchParameter Insert a blank row above the data being exported. false false False
-title String Insert a title row above the data. false false
-titleFormat String A Smartsheet format string for the title. To create a format string use New-SmartsheetFormatString. false false
-includeHeaders SwitchParameter Create a header row from the property names of the objects in the array. false false False
-headerFormat String A Smartsheet format string for the headers. To create a format string use New-SmartsheetFormatString. false false
-PassThru SwitchParameter Return the sheet object with the inserted rows, false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • If -PassThru is omitted nothing is returned. If specifying -PassThru the sheet object is returned with the inserted rows,

Note

This function is generally used to create the equivalent of an Excel table in a Smartsheet.
This is sort of "out of functionality" for how Smartsheets work, but some may find it useful.
You can use this function to append rows to an existing Smartsheet. See example 2 below.
Data will always be added starting at the left most column. If you wanted to insert data into a Smartsheet
starting at a certain column you would need to use the Add-SmartSheetRow function inserting blank cells into the beginning of
the cell array.

Examples

EXAMPLE 1
The following example imports the array into a Smartsheet, creates a blank row above the data and adds a title and a header row.
(To create the format variables use New-SmartsheetFormatString)
$Array | Export-SmartsheetRows -id $Sheet.Id -blankRowAbove -title "My Title" -TitleFormat $titleFormat -includeHeaders -headerFormat $headerFormat
EXAMPLE 2
The following example imports the array into a smartsheet appending the rows to the existing sheet without any title or headers. 
This can be used to append rows to the Smartsheet. No attempt is made to prevent duplicate data.
If the number of properties in the objects is more than the existing columns, then generic columns are created.
(To update rows based in their primary column values use the Update-Smartsheet function.)
$Array | Export-SmartsheetRows -id $Sheet.id

Top of page

Syntax

Get-Smartsheet -id <UInt64> [-level <Int32>] [-includeAll] [-includeAttachments] [-includeColumnTypes] [-includeCrossSheetReferences] [-includeDiscussions] [-includeFilters] [-includeFilterDefinitions] [-includeFormat] [-includeGantConfig] [-includeObjectValue] [-includeOwnerInfo] [-includeRowPermalink] [-includeSource] [-includeWriterInfo] [-excludeFilteredOutRows] [-excludeLinkInFromCellDetails] [-excludeLinkOutToCellDetails] [-excludeNonexistentCells] [-columnIds <PSObject[]>] [-rowIds <PSObject[]>] [<CommonParameters>]

Get-Smartsheet -Name <String> [-level <Int32>] [-includeAll] [-includeAttachments] [-includeColumnTypes] [-includeCrossSheetReferences] [-includeDiscussions] [-includeFilters] [-includeFilterDefinitions] [-includeFormat] [-includeGantConfig] [-includeObjectValue] [-includeOwnerInfo] [-includeRowPermalink] [-includeSource] [-includeWriterInfo] [-excludeFilteredOutRows] [-excludeLinkInFromCellDetails] [-excludeLinkOutToCellDetails] [-excludeNonexistentCells] [-columnIds <PSObject[]>] [-rowIds <PSObject[]>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id SheetId UInt64 Folder ID, cannot be used with the Name parameter. true true (ByValue, ByPropertyName) 0
-Name String Sheet Name, cannot be used with the id parameter. true false
-level Int32 Specifies whether new functionality, such as multi-contact data is returned in a backwards-compatible,
text format (level=0, default), multi-contact data (level=1), or multi-picklist data (level=2).
false false 0
-includeAll SwitchParameter Include All Sheet objects false false False
-includeAttachments SwitchParameter Includes the metadata for sheet-level and row-level attachments.
To include discussion attachments, both includeAttachments and includeDiscussions must be present.
false false False
-includeColumnTypes SwitchParameter Includes columnType attribute in the row's cells indicating the type of the column the cell resides in. false false False
-includeCrossSheetReferences SwitchParameter Includes the cross-sheet references false false False
-includeDiscussions SwitchParameter Includes sheet-level and row-level discussions.
To include discussion attachments, both includeAttachments and includeDiscussions must be present.
false false False
-includeFilters SwitchParameter Includes filteredOut attribute indicating if the row should be displayed or hidden according to the sheet's filters. false false False
-includeFilterDefinitions SwitchParameter Includes type of filter, operators used, and criteria false false False
-includeFormat SwitchParameter Includes column, row, cell, and summary fields formatting. false false False
-includeGantConfig SwitchParameter Includes Gantt chart details. false false False
-includeObjectValue SwitchParameter When used in combination with a level parameter, includes the email addresses for multi-contact data. false false False
-includeOwnerInfo SwitchParameter Includes the workspace and the owner's email address and user Id. false false False
-includeRowPermalink SwitchParameter Includes permalink attribute that represents a direct link to the row in the Smartsheet application. false false False
-includeSource SwitchParameter Adds the Source object indicating which report, sheet Sight (aka dashboard), or template the sheet was created from, if any. false false False
-includeWriterInfo SwitchParameter Includes createdBy and modifiedBy attributes on the row or summary fields, indicating the row or summary field's creator, and last modifier. false false False
-excludeFilteredOutRows SwitchParameter Excludes filtered out rows from response payload if a sheet filter is applied; includes total number of filtered rows false false False
-excludeLinkInFromCellDetails SwitchParameter Excludes the following attributes from the cell.linkInFromCell object: columnId, rowId, status false false False
-excludeLinkOutToCellDetails SwitchParameter Excludes the following attributes from the cell.linksOutToCells array elements: columnId, rowId, status false false False
-excludeNonexistentCells SwitchParameter Excludes cells that have never contained any data false false False
-columnIds PSObject[] An array of column ids.
The response contains only the specified columns in the "columns" array, and individual rows' "cells" array only
contains cells in the specified columns.
false false
-rowIds PSObject[] A array of row Ids on which to filter the rows included in the result. false false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A Smartsheet sheet object. There is an added method named ToArray that returns the sheet as an array of PowerShell objects.

Note

When retrieving a smartsheet by name there is always the chance that there are multiple sheets with the same name in a folder.
If more than one sheet have the same name, you will be prompted to select the sheet yu want from a list.
The list will show Sheet name and modified date.

Syntax

Get-SmartsheetAttachment -id <UInt64> -attachmentId <String> [<CommonParameters>]

Get-SmartsheetAttachment -id <UInt64> -attachmentId <String> [-saveAs <String>] [<CommonParameters>]

Get-SmartsheetAttachment -id <UInt64> -attachmentId <String> [-asByteArray <Byte[]>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id sheetId UInt64 The Smartsheet Id true true (ByPropertyName) 0
-attachmentId String The attachment Id. true false
-saveAs String Path and filename to save the attachment to. false false
-asByteArray Byte[] Returns the attachment as a byte array. false false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • If -saveAs and -asByteArray are not specified returns a smartsheet attachment object. if -saveAs is specified returns nothing. if -asByteArray is specified an array of bytes is returned.

Syntax

Get-SmartsheetAttachments [-id] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id sheetId UInt64 Smartsheet Id. true true (ByPropertyName) 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of Smartsheet attachment objects.

Syntax

Get-SmartsheetColumn [-Id] <UInt64> [-ColumnId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id UInt64 The Id of the sheet to retrieve the column. true true (ByPropertyName) 0
-ColumnId UInt64 The column Id to retrieve. true false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet column object.

Syntax

Get-SmartsheetColumns [-Id] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Id of the SMartsheet to return columns from. true true (ByPropertyName) 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of smartsheet column objects.

Syntax

Get-SmartSheetComment [-Id] <UInt64> [-commentId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The smartsheet Id. true true (ByPropertyName) 0
-commentId UInt64 The comment Id. true false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet comment object

Syntax

Get-SmartsheetDiscussions [-Id] <UInt64> [-includeAllComments] [-includeAttachments] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Smartsheet Id true true (ByPropertyName) 0
-includeAllComments SwitchParameter Include all comments. By default only the Discussion objects are returned. false false False
-includeAttachments SwitchParameter Include all attachment. By default only the Discussion objects are returned. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A Smartsheet discussion object.

Syntax

Get-SmartsheetFolder [-folderId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-folderId UInt64 ID of the folder to retrieve. true false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Folder object.

Syntax

Get-SmartsheetFolders [-Id] <UInt64> [[-Name] <String>] [-recurse] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id folderId UInt64 true true (ByPropertyName) 0
-Name String false true (ByPropertyName)
-recurse SwitchParameter This will return a list including all subfolders. This adds a new 'FullName'property which will be the full path of the folder from the folderID provided or the home folder.
The returned array will look like this.
id name permalink FullName
-- ---- --------- --------
7306313035212676 folder2 https://app.smartsheet.com/folders/V5g7j44M52jf9GgHgJcM2XPC8VP7mrq33VXCg741 folder2
5582828558673796 folder3 https://app.smartsheet.com/folders/fPpQw2qh24hFcVg9jRjCQqxH73Q85QVR243x77w1 folder2/folder3
6462437860894596 folder4 https://app.smartsheet.com/folders/C73GCm6M4hxcQ3f38cr3x57hwGGjpqp4mWr8mGx1 folder3/folder4
2079509634672516 folder3.1 https://app.smartsheet.com/folders/5P4JJfwF9Jj6rFvXJ94Gw9gG7rFm9cxM3QrxCxp1 folder2/folder3.1

You can filter the results by comparing the full or partial path to the FullName property.
false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of folder objects.

Syntax

Get-SmartsheetHome [<CommonParameters>]

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A nested array of home objects.

Syntax

Get-SmartsheetHomeFolders [<CommonParameters>]

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of abbreviated folder objects.

Syntax

Get-SmartsheetImageUrl [-Id] <UInt64> [[-saveAs] <String>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id imageId UInt64 Id of the image to get the Url for. true true (ByPropertyName) 0
-saveAs String Path and filename to save the image to. false false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Smartsheet Url image object containing imageId and Url.

Syntax

Get-SmartsheetRow [-Id] <UInt64> [-rowId] <UInt64> [-includeColumns] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 Id of the Smartsheet to get the row from. true true (ByPropertyName) 0
-rowId UInt64 Id of the row to get. true false 0
-includeColumns SwitchParameter Include column objects in the returned object. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A row object (optionally with column objects).

Syntax

Get-SmartsheetRowDiscussions [-id] <UInt64> [-rowId] <UInt64> [-includeComments] [-includeAttachments] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id sheetId UInt64 The Smartsheet Id. true true (ByPropertyName) 0
-rowId UInt64 The Row id. true false 0
-includeComments SwitchParameter Include comments. By default only the discussion objects are returned. false false False
-includeAttachments SwitchParameter include attachments. By default only the discussion objects are returned. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet discussion object.

Syntax

Get-Smartsheets [<CommonParameters>]

Outputs

The output type is the type of the objects that the cmdlet emits.

  • AN array of Smartsheet objects.

Syntax

Get-SmartSheetShare [-Id] <UInt64> [-shareId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Id of the Smartsheet. true true (ByPropertyName) 0
-shareId UInt64 The Id of the share. true false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A Smartsheet share object.

Syntax

Get-SmartsheetShares [-Id] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Id of the Smartsheet true true (ByPropertyName) 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of Smartsheet share Object.

Syntax

Get-SmartsheetWorkspace [-Id] <UInt64> [-IncludeSource] [-IncludeDistributionLink] [-IncludeOwnerInfo] [-IncludeSheetVersion] [-IncludePermaLinks] [-LoadNestedFolder] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id WorkspaceId UInt64 true true (ByPropertyName) 0
-IncludeSource SwitchParameter Include the Source object indicating which object the folder was created from, if any. false false False
-IncludeDistributionLink SwitchParameter INclude distribution links, false false False
-IncludeOwnerInfo SwitchParameter Include owner information. false false False
-IncludeSheetVersion SwitchParameter Include sheet version false false False
-IncludePermaLinks SwitchParameter Include permalinks. false false False
-LoadNestedFolder SwitchParameter false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A workspace object.

Syntax

Get-SmartsheetWorkspaceFolders [-Id] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id WorkspaceId UInt64 The Id of the workspace to retrieve folders from. true true (ByPropertyName) 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of folder objects.

Note

The returned collection consists of abbreviated folder objects. These object contain only the id, name, and permalink properties.
You cannot return a recursive list with this function. To get a recursive list of subfolder use the Get-SmartsheetFolders function and provide the
Id of one of the top level folders returned by this function.

Syntax

Get-SmartsheetWorkspaces [<CommonParameters>]

Syntax

Get-SortedSmartsheet -id <UInt64> -sortCriteria <PSObject[]> [<CommonParameters>]

Get-SortedSmartsheet -id <UInt64> -columnId <UInt64> [-direction <String>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id SheetId UInt64 Id of the sheet to sort rows in. true true (ByPropertyName) 0
-sortCriteria PSObject[] An array of sort criteria objects. The objects should have 2 properties, columnId and direction (ASCENDING or DESCENDING) true false
-columnId UInt64 Id of the column to sort on for a single column sort. true false 0
-direction String The direction of the sort. false false ASCENDING

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Sheet object with the results of the sort operation.

Note

If you are retrieving the Smartsheet to process the data within powershell it may be easier and more efficient to do the sorting within powershell.

For Example:

PS> $Sheet = Get-Smartsheet -sheetId 465987456
PS> $Data = $Sheet.ToArray() | Sort-Object -Property Name, HireDate.

Examples

EXAMPLE 1
How to create a multi-sort sortCriteria object.
In this example we are going to sort a Smartsheet of employee salary information by Department and Salary in descending order.
To create the criteria create an array of hash table object.
PS> $sortCriteria - @(
        @{
            sortCriteria = @{
                columnId = $Sheet.columns.Where({$_.title -eq "Department"}).ColumnId
                direction = "ASCENDING"
            },
            @{
            {
                columnId = $Sheet.Columns.Where({$_.title -eq "Salary"}).ColumnId
                direction = "DESCENDING"
            }
        }
    )
Now sort the sheet.
PS >$SortedSheet = $sheet | Get-SortedSmartSheet -SortCriteria $sortCriteria

Top of page

Syntax

Move-Smartsheet -Id <UInt64> [<CommonParameters>]

Move-Smartsheet -Id <UInt64> [-containerId <String>] [-containerType <String>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 ID of the the Smartsheet to move. true true (ByValue, ByPropertyName) 0
-containerId String Id of the container (folder/workspace) to move the Smartsheet to.
if omitted the container is 'home'
false false
-containerType String Can be one of 'folder', 'workspace or 'home'. If 'home' then containerId must be omitted.
The default for this property is 'home' if omitted.
false false home

Syntax

Move-SmartSheetRows -id <UInt64> -targetSheetId <UInt64> -rowIds <UInt64[]> [-ignoreRowsNotFound] [<CommonParameters>]

Move-SmartSheetRows -id <UInt64> -targetSheetId <UInt64> -rowIds <UInt64[]> [-includeAll] [-ignoreRowsNotFound] [<CommonParameters>]

Move-SmartSheetRows -id <UInt64> -targetSheetId <UInt64> -rowIds <UInt64[]> [-includeAttachments] [-includeDiscussions] [-ignoreRowsNotFound] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id sourceSheetId UInt64 The source Sheet Id true true (ByPropertyName) 0
-targetSheetId UInt64 The Target sheet Id. true false 0
-rowIds UInt64[] An array of row Ids to move to the target sheet. true false
-includeAll SwitchParameter include both attachments and discussions. false false False
-includeAttachments SwitchParameter Include row attachments. false false False
-includeDiscussions SwitchParameter Include row discussions. false false False
-ignoreRowsNotFound SwitchParameter If specified, row Ids that do not exist within the source sheet do not cause an error response. If omitted,
specifying row Ids that do not exist within the source sheet causes an error response (and no rows are copied).
false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An object containing the row mappings.

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Columns None psobject[] false false
-ContainerType None string false false
-Id folderId, workspaceId ulong false true (ByPropertyName)
-IncludeAll None switch false false
-IncludeAttachments None switch false false
-IncludeCellLinks None switch false false
-IncludeData None switch false false
-IncludeDiscussions None switch false false
-IncludeFilters None switch false false
-IncludeForms None switch false false
-IncludeRuleReceipts None switch false false
-IncludeRules None switch false false
-SheetName None string true false
-TemplateId None ulong false false

Syntax

New-SmartSheetCell [-columnId] <UInt64> [[-conditionalFormat] <String>] [[-format] <String>] [[-formula] <String>] [[-hyperlink] <PSObject>] [[-image] <PSObject>] [[-linkInFromCell] <PSObject>] [[-linksOutFromCell] <PSObject[]>] [-value] <PSObject> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-columnId UInt64 Column ID of the cell true false 0
-conditionalFormat String A conditional format object. false false
-format String A format descriptor string. false false
-formula String A formula string false false
-hyperlink PSObject A hyperlink object false false
-image PSObject An image object. false false
-linkInFromCell PSObject A cell link object false false
-linksOutFromCell PSObject[] A cell link object false false
-value PSObject The value of the cell true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet cell object.

Syntax

New-SmartsheetColumn [-title] <String> [-primary] [[-description] <String>] [[-type] <String>] [[-formula] <PSObject>] [-hidden] [[-autoNumberFormat] <PSObject>] [[-contactOptions] <PSObject>] [[-format] <String>] [-locked] [[-options] <String[]>] [[-symbol] <String>] [[-systemColumnType] <String>] [-validation] [[-width] <Int32>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-title String Column title true false
-primary SwitchParameter Set this column to the primary column.
NOTE: if a primary column already exists this wil cause an error when added to a smartsheet.
false false False
-description String Colunm description. false false
-type String Column type. false false TEXT_NUMBER
-formula PSObject Formula forthe column. false false
-hidden SwitchParameter Column is hidden false false False
-autoNumberFormat PSObject Object that describes how the the System Column type of "AUTO_NUMBER" is auto-generated. false false
-contactOptions PSObject Array of ContactOption objects to specify a pre-defined list of values for the column. Column type must be CONTACT_LIST. false false
-format String The format descriptor. false false
-locked SwitchParameter Column is locked. false false False
-options String[] Array of option for the column. Only valid for PICKLIST and MULTI_PICKLIST column types. false false
-symbol String Only applicable for CHECKBOX and PICKLIST column types. false false
-systemColumnType String If this is a SystemColumn type the type of system column. false false
-validation SwitchParameter Is validation enabled. false false False
-width Int32 Width of the column in pixels. false false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A Smartsheet column object.

Syntax

New-SmartsheetFolder [-Id] <UInt64> [-folderName] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id folderId UInt64 Id of the folder to create the new folder in. true true (ByPropertyName) 0
-folderName String Name of the new folder. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • The newly created folder object.

Syntax

New-SmartSheetFormatString [[-fontFamily] <String>] [[-fontSize] <Int32>] [-bold] [-italic] [-underline] [-stikethrough] [[-horizontalAlign] <String>] [[-verticalAlign] <String>] [[-textColor] <String>] [[-backgroundColor] <String>] [[-taskbarColor] <String>] [[-currency] <String>] [[-decimalCount] <Int32>] [-thousandsSeparator] [[-numberFormat] <String>] [-textWrap] [[-dateFormat] <String>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-fontFamily String Sets the Font Family to use. false false
-fontSize Int32 Sets the font size. false false 0
-bold SwitchParameter Sets to font to bold. false false False
-italic SwitchParameter Sets the font to italic false false False
-underline SwitchParameter Sets the font to underline false false False
-stikethrough SwitchParameter Sets the font to strikethrough. false false False
-horizontalAlign String Set the horizontal alignment false false
-verticalAlign String Set the vertical alignment false false
-textColor String Select the Text Color. Supports : autocomplete. false false
-backgroundColor String Select the Background color. Supports : autocomplete. false false
-taskbarColor String Select the Taskbar color. Supports : autocomplete. false false
-currency String Select the Currency Symbol. Supports : autocomplete. false false
-decimalCount Int32 Set the decimal count false false 0
-thousandsSeparator SwitchParameter Sets the thousands separator. false false False
-numberFormat String Sets the Number format. Supports: autocomplete. false false
-textWrap SwitchParameter Sets textwrap. false false False
-dateFormat String sets the date format. Supports : autocomplete. false false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A string representing a Smartsheet formatting string.

Syntax

New-SmartSheetHomeFolder [-folderName] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-folderName String The name of the new folder. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • The newly created folder object.

Syntax

Remove-Smartsheet [-Id] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 Sheet Id, the sheet Id to remove. true true (ByPropertyName) 0

Syntax

Remove-SmartSheetAttachment [-Id] <String> [-attachmentId] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId String The Smartsheet Id. true true (ByPropertyName)
-attachmentId String The attachment Id. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success of failure. True = success.

Syntax

Remove-SmartsheetColumn [-Id] <UInt64> [-columnId] <UInt64> [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Id of the Smartsheet to remove the column. true true (ByPropertyName) 0
-columnId UInt64 The Id of the column to remove. true false 0
-PassThru SwitchParameter Return the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success or failure of the operation. if PassThru is provided returns the updated sheet object.

Syntax

Remove-SmartsheetComment [-Id] <UInt64> [-commentId] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The smartsheet Id. true true (ByPropertyName) 0
-commentId String The comment Id. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success of failure. True = success.

Syntax

Remove-SmartsheetDiscussion [-id] <UInt64> [-discussionId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-id sheetid UInt64 The Smartsheet Id. true true (ByPropertyName) 0
-discussionId UInt64 The discussion Id. true false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success of failure. True = success.

Syntax

Remove-SmartsheetFolder [-folderId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-folderId UInt64 The Id of the folder to be removed. true false 0

Syntax

Remove-SmartsheetRow [-Id] <UInt64> [-rowId] <UInt64> [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 ID of Smartsheet to remove the row, true true (ByPropertyName) 0
-rowId UInt64 The rowID of the row to remove. true false 0
-PassThru SwitchParameter Return the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • True is delete was successful. if PassThru is specified returns the updated sheet object.

Syntax

Remove-SmartsheetRows [-Id] <UInt64> [-rowIds] <UInt64[]> [[-ignoreRowsNotFound] <Boolean>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 ID of Smartsheet to remove the rows, true true (ByPropertyName) 0
-rowIds UInt64[] An array of rowIDs to be remove. true false
-ignoreRowsNotFound Boolean Suppress errors if row not found. false false False
-PassThru SwitchParameter Returns the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • True if successful. if PassThru is specified, return the updated smartsheet object.

Syntax

Remove-SmartsheetShare [-Id] <UInt64> [-shareId] <UInt64> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Sheet id of the sheet to share. true true (ByPropertyName) 0
-shareId UInt64 Id of the share to remove. true false 0

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success or failure.

Syntax

Remove-SmartSheetWorkspace [-Id] <UInt64> [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id WorkspaceId UInt64 The Id of thw workspace to delete. true true (ByPropertyName) 0
-WhatIf wi SwitchParameter false false
-Confirm cf SwitchParameter false false

Syntax

Rename-SmartSheet [-Id] <UInt64> [-NewSheetName] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId UInt64 Id of the sheet to rename. true true (ByPropertyName) 0
-NewSheetName String New name for the sheet true false

Syntax

Search-Smartsheet [-Id] <UInt64> [-searchText] <String> [-exact] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Sheet ID of the sheet to search. true true (ByPropertyName) 0
-searchText String Text to search for true false
-exact SwitchParameter Match text exactly. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of search results.

Syntax

Search-SmartsheetAccount [-searchText] <String> [-exact] [-personalWorkspaces] [[-modifiedSince] <DateTime>] [-favoriteFlag] [[-scopes] <String[]>] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-searchText String The search text to search for. true false
-exact SwitchParameter Use an exact search for the given text. Without this switch, all words provided will be searched for. false false False
-personalWorkspaces SwitchParameter Restrict the search to the users personal workspaces. false false False
-modifiedSince DateTime Restrict the search to sheets modified after this date. false false
-favoriteFlag SwitchParameter Indicates which returned items are favorites. favorite -- dashboards, folders, reports, sheets, templates, and workspaces
will have the property favorite: true parentObjectFavorite -- attachments, discussions, summary fields, and rows will
have the property parentObjectFavorite: true
false false False
-scopes String[] If search fails, try using an array for each type of this list of search filters.
"attachments" "cellData" "comments" "folderNames" "reportNames" "sheetNames" "sightNames" "summaryFields" "templateNames" "workspaceNames"
false false

Syntax

Send-SmartsheetRowsViaEmail [-Id] <UInt64> [-rowIds] <UInt64[]> [[-columnIds] <UInt64[]>] [-To] <String[]> [[-subject] <String>] [[-message] <String>] [-includeAttachments] [-includeDiscussions] [[-layout] <String>] [-ccMe] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Smartsheet Id. true true (ByPropertyName) 0
-rowIds UInt64[] An array row Ids to be included. true false
-columnIds UInt64[] An array of column Ids to be included.
If the columnIds attribute of the MultiRowEmail object is specified as an array of column Ids, those specific columns are included.
If the columnIds attribute of the MultiRowEmail object is omitted, all columns except hidden columns shall be included.
If the columnIds attribute of the MultiRowEmail object is specified as empty, no columns shall be included.
(NOTE: In this case, either includeAttachments=true or includeDiscussions=true must be specified.)
false false
-To String[] An array of recipients. true false
-subject String The subject of the email. false false
-message String The message of the email. false false
-includeAttachments SwitchParameter Include attachment in email. false false False
-includeDiscussions SwitchParameter Include Discussions in email. false false False
-layout String Layout of the rows. Either horizontal or Vertical. Default is horizontal for multiple rows, vertical for a single row. false false HORIZONTAL
-ccMe SwitchParameter Copy email to sender. false false False

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId ulong true true (ByPropertyName)
-Message None string false false
-Subject None string true false
-To None string[] true false
-ccMe None switch false false
-format None string false false
-paperSize None string false false

Syntax

Set-SmartsheetAPIKey [-APIKey] <String> [-Secure] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-APIKey String The Smartsheet API Access Token. true false
-Secure SwitchParameter This switch instructs the function to save the APIKey into a secure vault.
This vaule is created and managed by the modules:
Microsoft.PowerShell.SecretManagement
Microsoft.PowerShell.SecretStore
See the note below on how to setup a secret store.
false false False

Note

To use a secret store to securely store you API key, you must install the required modules
and configure the store and create a vaule.

To install the modules:
Install-Module Microsoft.PowerShell.SecretManagement
Install-Module Microsoft.PowerShell.SecretStore

Configure the secret store:
You must configure your secret store and set the authenticatio, there are several parameters:
-Authentication: This can ne either 'Password" or 'None'
You should set a password for interactive sessions. For automation on a secure device you can set this to 'None'
-Interaction: This can be set to 'Prompt' or 'None' If -Authentication is set to 'Password' This must be set to 'Prompt', id Authentication is set to 'None' this must ne set to 'None'.
-PasswordTimeOut: The time in seconds befopre the password must be re-entered. The default is 600 seconds.
-Password: The password to unlock the vault. If omitted you will be prompted for the password.

Register the vault:
You must register a vault to store your secrets. At this time the Secret Store does not support multiple vaules.
While you "can" register multiple vaults the store will just be duplicated. This is a known issue with the SecretStore and may be corrected in the future.
Only create 1 vault and register it as the default vault.

Register-SecretVault -Name "MyVault" -DefaultVault -ModuleName Microsoft.Powershell.SecretStore

Syntax

Set-SmartsheetColumn -Id <UInt64> -ColumnId <UInt64> [-PassThru] [<CommonParameters>]

Set-SmartsheetColumn -Id <UInt64> -ColumnId <UInt64> -column <PSObject> [-PassThru] [<CommonParameters>]

Set-SmartsheetColumn -Id <UInt64> -ColumnId <UInt64> -Index <Int32> [-title <String>] [-description <String>] [-type <String>] [-formula <PSObject>] [-hidden <Boolean>] [-autoNumberFormat <PSObject>] [-contactOptions <PSObject>] [-format <String>] [-locked <Boolean>] [-options <String[]>] [-symbol <String>] [-systemColumnType <String>] [-validation <Boolean>] [-width <Int32>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id UInt64 Id of the Smartsheet containing the column. true true (ByPropertyName) 0
-ColumnId UInt64 Id of the column to update. true false 0
-column PSObject A Smartsheet column object. Cannot be used with column property parameters. true false
-Index Int32 Index if the column to update. true false 0
-title String Column Title false false
-description String Column description false false
-type String Column type false false
-formula PSObject The formula for a column, if set, for instance =data@row. false false
-hidden Boolean Indicates visibility of the column. false false False
-autoNumberFormat PSObject Object that describes how the the System Column type of "AUTO_NUMBER" is auto-generated. false false
-contactOptions PSObject Array of ContactOption objects to specify a pre-defined list of values for the column. Column type must be CONTACT_LIST. false false
-format String Format string. false false
-locked Boolean Indicates whether the column is locked. A value of true indicates that the column has been locked by the sheet owner or the admin. false false False
-options String[] Array of the options available for the column. false false
-symbol String When applicable for CHECKBOX or PICKLIST column types. false false
-systemColumnType String If this is a system column what type is it. false false
-validation Boolean Indicates whether validation has been enabled for the column (value = true). false false False
-width Int32 Display width of the column in pixels. false false 0
-PassThru SwitchParameter Return the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An updated column object. If PassThru is provided returns the updated sheet object.

Syntax

Set-SmartSheetComment [-Id] <UInt64> [-commentId] <UInt64> [-text] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 The Smartsheet Id. true true (ByPropertyName) 0
-commentId UInt64 The Command d. true false 0
-text String The updated text for the comment. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • A smartsheet comment object

Syntax

Set-SmartsheetRow -Id <UInt64> -Row <PSObject> [-PassThru] [<CommonParameters>]

Set-SmartsheetRow -Id <UInt64> -rowId <UInt64> [-expanded <Boolean>] [-format <String>] [-Cells <PSObject[]>] [-locked <Boolean>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Id os the Smartsheet to update. true true (ByPropertyName) 0
-Row PSObject A Smartsheet row object containing the updates (cannot be used with individual properties). true false
-rowId UInt64 Row ID of the row to be updated. true false 0
-expanded Boolean True if the row is expanded, false if not. false false False
-format String Format descriptor. Only returned if the include query string parameter contains format and this row has a non-default format applied. false false
-Cells PSObject[] An array of Smartsheet cell objects. false false
-locked Boolean Indicates if the row is locked or not. false false False
-PassThru SwitchParameter Return the updated sheet false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success or failure. if PassThru is specified, return the updated sheet object.

Syntax

Set-SmartsheetRows [-Id] <String> [[-Rows] <Object[]>] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id SheetId String ID of the Smartsheet to update. true true (ByPropertyName)
-Rows Object[] An array of smartsheet row objects. false false
-PassThru SwitchParameter Return the updated sheet. false false False

Outputs

The output type is the type of the objects that the cmdlet emits.

  • An array of updated rows. If PassThru is specified, returns the updated sheet object,

Syntax

Set-SmartsheetShare [-Id] <UInt64> [-shareId] <UInt64> [-accessLevel] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id sheetId UInt64 Id of the Smartsheet. true true (ByPropertyName) 0
-shareId UInt64 ID of the share. true false 0
-accessLevel String Access level to set. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean indicating success or failure.

Syntax

Set-SmartSheetWorkspace [-Id] <UInt64> [-Name] <String> [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-Id WorkspaceId UInt64 The Id of thw workspace to rename. true true (ByPropertyName) 0
-Name String The new name of the workspace. true false

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Object containing the renamed workspace.

Syntax

Update-Smartsheet [-InputObject] <PSObject[]> [-sheetId] <UInt64> [-UseRowId] [-PassThru] [<CommonParameters>]

Parameters

Name Alias Type Description Required? Pipeline Input Default Value
-InputObject PSObject[] An array of powershell objects. true true (ByValue)
-sheetId UInt64 The Id of the sheet to update. true false 0
-UseRowId SwitchParameter This assumes that the objects in the array have a property called RowId which contains the Smartsheet row Id for the data,
This will update the row associated with that Row Id.
false false False
-PassThru SwitchParameter Return the updated sheet object. false false False

Note

To return an array of objects from a smartsheet that contains the row id of the row the values are associated with use the ToArray method
on the sheet object returned by Get-Smartsheet passing a value of $true. $sheet.ToArray($true).

Updating sheet rows based on the primary column is maintained for backward compatibility. You should use the RowId method in any new projects
as it is more accurate and does not depend on the primary column being unique. Smartsheet does not force uniqueness on the primary column.

If you are updating a sheet from external data (not modifying the sheet itself) then the properties of external data must match the columns in the sheet.
If the properties of the external data adds, removes, or changes or the sheet adds, removes, or changes coljmns YOU must handle the changes to the sheet or data manually.
You can add, remove, and change columns using the column functions!

Updating sheets by primary column may be removed from future versions of this module.

Examples

EXAMPLE 1
Update the rows in the smartsheet based on Primary Columns.
$Array | Update-Smartsheet -SheetId $sheet.id
EXAMPLE 2
Update the rows in the smartsheet based on the RowId property.
$Array | Update-Smartsheet -SheetId $Sheet.Id -UseRowId
EXAMPLE 3
Update the rows in the smartsheet based on the RowId property and return the updated sheet.
$Array | Update-Smartsheet -SheetId $Sheet.Id -UseRowId -PassThru

Top of page