Skip to content

Set-SqlDscDatabaseDefaultFullTextCatalog: New command proposal #2330

Description

@coderabbitai

Description

Add a new public command Set-SqlDscDatabaseDefaultFullTextCatalog to configure the default full-text catalog for a SQL Server database using the SMO SetDefaultFullTextCatalog() method.

Details

The DefaultFullTextCatalog property on the SMO Database class requires calling the SetDefaultFullTextCatalog() method rather than direct property assignment. This command should be implemented as a separate cmdlet following the pattern established by other method-based commands.

Proposed Implementation

  • Command Name: Set-SqlDscDatabaseDefaultFullTextCatalog
  • Parameter Sets:
    • ServerObject + Name (with optional Refresh)
    • DatabaseObject (accepting pipeline input)
  • Required Parameters:
    • CatalogName: The name of the full-text catalog to set as default
  • Optional Parameters:
    • Force: Bypass confirmation prompts
    • PassThru: Return the updated database object
  • Behavior:
    • Support ShouldProcess for -WhatIf and -Confirm
    • Call $databaseObject.SetDefaultFullTextCatalog($CatalogName) on the SMO Database object
    • Include proper parameter validation and error handling
    • Follow DSC Community PowerShell coding guidelines

Related Issues and PRs

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementThe issue is an enhancement request.in progressThe issue is being actively worked on by someone.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions