Skip to content

Commit 55d5e67

Browse files
potatoqualiteegithub-actions[bot]
authored andcommitted
refreshing docs pages
1 parent 80b2f8b commit 55d5e67

24 files changed

+3841
-749
lines changed

Add-DbaAgDatabase.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ <h2 id="syntax">Syntax</h2>
531531
[-UseLastBackup]
532532
[-AdvancedBackupParams &lt;Hashtable&gt;]
533533
[-NoWait]
534+
[-SkipReuseSourceFolderStructure]
534535
[-EnableException]
535536
[-WhatIf]
536537
[-Confirm]
@@ -546,6 +547,7 @@ <h2 id="syntax">Syntax</h2>
546547
[-UseLastBackup]
547548
[-AdvancedBackupParams &lt;Hashtable&gt;]
548549
[-NoWait]
550+
[-SkipReuseSourceFolderStructure]
549551
[-EnableException]
550552
[-WhatIf]
551553
[-Confirm]
@@ -948,6 +950,36 @@ <h5 id="nowait">-NoWait</h5>
948950
</tr>
949951
</tbody>
950952
</table>
953+
<h5 id="skipreusesourcefolderstructure">-SkipReuseSourceFolderStructure</h5>
954+
<p>Prevents restores from using the source server's folder structure when restoring databases to secondary replicas.<br />
955+
When enabled, Restore-DbaDatabase uses the replica's default data and log directories instead of attempting to replicate the primary's folder structure.<br />
956+
This is automatically set to true when the primary and replica servers run on different operating system platforms (e.g., Windows primary with Linux replica).<br></p>
957+
<table>
958+
<thead>
959+
<tr>
960+
<th></th>
961+
<th></th>
962+
</tr>
963+
</thead>
964+
<tbody>
965+
<tr>
966+
<td>Alias</td>
967+
<td></td>
968+
</tr>
969+
<tr>
970+
<td>Required</td>
971+
<td>False</td>
972+
</tr>
973+
<tr>
974+
<td>Pipeline</td>
975+
<td>false</td>
976+
</tr>
977+
<tr>
978+
<td>Default Value</td>
979+
<td>False</td>
980+
</tr>
981+
</tbody>
982+
</table>
951983
<h5 id="enableexception">-EnableException</h5>
952984
<p>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.<br />
953985
This avoids overwhelming you with &quot;sea of red&quot; exceptions, but is inconvenient because it basically disables advanced scripting.<br />

Compare-DbaAgReplicaSync.html

Lines changed: 695 additions & 0 deletions
Large diffs are not rendered by default.

Connect-DbaInstance.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ <h2 id="syntax">Syntax</h2>
523523
[[-SqlExecutionModes] &lt;String&gt;]
524524
[[-StatementTimeout] &lt;Int32&gt;]
525525
[-TrustServerCertificate]
526+
[-AllowTrustServerCertificate]
526527
[[-WorkstationId] &lt;String&gt;]
527528
[-AlwaysEncrypted]
528529
[[-AppendConnectionString] &lt;String&gt;]
@@ -651,6 +652,14 @@ <h5 id="example-18">Example: 18</h5>
651652
Receives all non-system processes from the instance using the DAC.<br>
652653
Opens a grid view to let the user select processes to be stopped.<br>
653654
Closes the connection.<br></p>
655+
<h5 id="example-19">Example: 19</h5>
656+
<pre><code>PS C:\&gt; $servers = &quot;sql1&quot;, &quot;sql2&quot;, &quot;sql3&quot;
657+
PS C:\&gt; $servers | Connect-DbaInstance -AllowTrustServerCertificate
658+
</code></pre>
659+
<p>Connects to multiple servers where some may have valid TLS certificates and others may not.<br>
660+
For each server, attempts connection with proper TLS validation first.<br>
661+
If a server fails due to certificate validation, automatically retries with TrustServerCertificate enabled.<br>
662+
This provides a secure-by-default approach for mixed environments without requiring separate connection logic.<br></p>
654663
<h3 id="required-parameters">Required Parameters</h3>
655664
<h5 id="sqlinstance">-SqlInstance</h5>
656665
<p>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances. <br></p>
@@ -1331,6 +1340,36 @@ <h5 id="trustservercertificate">-TrustServerCertificate</h5>
13311340
</tr>
13321341
</tbody>
13331342
</table>
1343+
<h5 id="allowtrustservercertificate">-AllowTrustServerCertificate</h5>
1344+
<p>Attempts connection with proper TLS validation first, then retries with TrustServerCertificate if the initial connection fails due to certificate validation.<br />
1345+
Provides a secure-by-default approach for mixed environments where some servers have valid certificates and others do not.<br />
1346+
Only retries on certificate validation failures, not on other connection errors like authentication or network issues.<br></p>
1347+
<table>
1348+
<thead>
1349+
<tr>
1350+
<th></th>
1351+
<th></th>
1352+
</tr>
1353+
</thead>
1354+
<tbody>
1355+
<tr>
1356+
<td>Alias</td>
1357+
<td></td>
1358+
</tr>
1359+
<tr>
1360+
<td>Required</td>
1361+
<td>False</td>
1362+
</tr>
1363+
<tr>
1364+
<td>Pipeline</td>
1365+
<td>false</td>
1366+
</tr>
1367+
<tr>
1368+
<td>Default Value</td>
1369+
<td>(Get-DbatoolsConfigValue -FullName 'sql.connection.allowtrustcert')</td>
1370+
</tr>
1371+
</tbody>
1372+
</table>
13341373
<h5 id="workstationid">-WorkstationId</h5>
13351374
<p>Sets the workstation name visible in SQL Server monitoring and session information.<br />
13361375
Use this to identify the source of connections in sys.dm_exec_sessions or when troubleshooting connection issues.<br></p>

Copy-DbaAgentJobStep.html

Lines changed: 858 additions & 0 deletions
Large diffs are not rendered by default.

Copy-DbaCredential.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ <h5 id="destinationsqlcredential">-DestinationSqlCredential</h5>
669669
</tbody>
670670
</table>
671671
<h5 id="name">-Name</h5>
672-
<p>Specifies the credential names to copy from the source server. Supports wildcards for pattern matching.<br />
672+
<p>Specifies the credential names to copy from the source server. Does not supports wildcards for pattern matching.<br />
673673
Use this when you only need to migrate specific credentials instead of all credentials on the server.<br />
674674
Note: if spaces exist in the credential name, you will have to type &quot;&quot; or '' around it.<br></p>
675675
<table>
@@ -699,7 +699,7 @@ <h5 id="name">-Name</h5>
699699
</tbody>
700700
</table>
701701
<h5 id="excludename">-ExcludeName</h5>
702-
<p>Specifies credential names to exclude from the copy operation. Supports wildcards for pattern matching.<br />
702+
<p>Specifies credential names to exclude from the copy operation. Does not support wildcards for pattern matching.<br />
703703
Use this when you want to copy most credentials but skip specific ones like test accounts or deprecated credentials.<br></p>
704704
<table>
705705
<thead>
@@ -728,7 +728,7 @@ <h5 id="excludename">-ExcludeName</h5>
728728
</tbody>
729729
</table>
730730
<h5 id="identity">-Identity</h5>
731-
<p>Specifies the credential identities (user accounts) to copy from the source server. Supports wildcards for pattern matching.<br />
731+
<p>Specifies the credential identities (user accounts) to copy from the source server. Does not support wildcards for pattern matching.<br />
732732
Use this when you need to migrate credentials for specific service accounts or domain users rather than filtering by credential name.<br />
733733
Note: if spaces exist in the credential identity, you will have to type &quot;&quot; or '' around it.<br></p>
734734
<table>
@@ -758,7 +758,7 @@ <h5 id="identity">-Identity</h5>
758758
</tbody>
759759
</table>
760760
<h5 id="excludeidentity">-ExcludeIdentity</h5>
761-
<p>Specifies credential identities (user accounts) to exclude from the copy operation. Supports wildcards for pattern matching.<br />
761+
<p>Specifies credential identities (user accounts) to exclude from the copy operation. Does not support wildcards for pattern matching.<br />
762762
Use this when you want to copy most credentials but skip those associated with specific service accounts or domain users.<br></p>
763763
<table>
764764
<thead>

Copy-DbaDbTableData.html

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ <h2 id="syntax">Syntax</h2>
506506
[[-Table] &lt;String[]&gt;]
507507
[[-View] &lt;String[]&gt;]
508508
[[-Query] &lt;String&gt;]
509+
[-ForceExplicitMapping]
509510
[-AutoCreateTable]
510511
[[-BatchSize] &lt;Int32&gt;]
511512
[[-NotifyAfter] &lt;Int32&gt;]
@@ -587,6 +588,23 @@ <h5 id="example-8">Example: 8</h5>
587588
<pre><code>PS C:\&gt; Copy-DbaDbTableData -SqlInstance sql1 -Database tempdb -View [tempdb].[dbo].[vw1] -DestinationTable [SampleDb].[SampleSchema].[SampleTable] -AutoCreateTable
588589
</code></pre>
589590
<p>Copies all data from [tempdb].[dbo].[vw1] (3-part name) view on instance sql1 to an auto-created table [SampleDb].[SampleSchema].[SampleTable] on instance sql1<br></p>
591+
<h5 id="example-9">Example: 9</h5>
592+
<pre><code>PS C:\&gt; $params = @{
593+
&gt;&gt; SqlInstance = &quot;SERVER001&quot;
594+
&gt;&gt; Database = &quot;MyDatabaseName&quot;
595+
&gt;&gt; View = &quot;sys.schemas&quot;
596+
&gt;&gt; Query = &quot;SELECT 0, DB_NAME(), [name] FROM sys.schemas&quot;
597+
&gt;&gt; Destination = &quot;SERVER002&quot;
598+
&gt;&gt; DestinationDatabase = &quot;MyOtherDatabaseName&quot;
599+
&gt;&gt; DestinationTable = &quot;syscollect.stage_map_schema_id&quot;
600+
&gt;&gt; }
601+
&gt;&gt;
602+
PS C:\&gt; Copy-DbaDbTableData @params
603+
</code></pre>
604+
<p>Copies schema data from sys.schemas to a table with an identity column.<br>
605+
The first SELECT column (0) is a placeholder for the destination's identity column.<br>
606+
Since -KeepIdentity is not specified, the destination auto-generates identity values and ignores the placeholder.<br>
607+
Columns are mapped by position: 0 → ID (ignored), DB_NAME() → database_name, [name] → schema_name.<br></p>
590608
<h3 id="optional-parameters">Optional Parameters</h3>
591609
<h5 id="sqlinstance">-SqlInstance</h5>
592610
<p>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.<br></p>
@@ -822,7 +840,9 @@ <h5 id="view">-View</h5>
822840
</table>
823841
<h5 id="query">-Query</h5>
824842
<p>Custom SQL SELECT query to use as the data source instead of copying the entire table or view. Supports 3 or 4-part object names.<br />
825-
Use this when you need to filter rows, join multiple tables, or transform data during the copy operation. Still requires specifying a Table or View parameter for metadata purposes.<br></p>
843+
Use this when you need to filter rows, join multiple tables, or transform data during the copy operation. Still requires specifying a Table or View parameter for metadata purposes.<br />
844+
Note: Columns are mapped by ordinal position. If the destination table has an identity column, include a placeholder value (e.g., 0) in your SELECT list at that position.<br />
845+
The placeholder will be ignored and the identity value auto-generated unless -KeepIdentity is specified.<br></p>
826846
<table>
827847
<thead>
828848
<tr>
@@ -849,6 +869,37 @@ <h5 id="query">-Query</h5>
849869
</tr>
850870
</tbody>
851871
</table>
872+
<h5 id="forceexplicitmapping">-ForceExplicitMapping</h5>
873+
<p>When used together with Query parameter, force the use of explicit column mapping (name-based) instead of switching over to ordinal position mapping. Use with care if query contains aliases.<br />
874+
Default behaviour when using Query parameter is to use ordinal position mapping, due to the possibility of the query including aliases (SELECT x AS y) which could lead to column mismatching and data<br />
875+
not copying.<br />
876+
The downside of it automatically switching over to ordinal mapping is that it also tries to copy over computed columns, which will cause it to fail.<br></p>
877+
<table>
878+
<thead>
879+
<tr>
880+
<th></th>
881+
<th></th>
882+
</tr>
883+
</thead>
884+
<tbody>
885+
<tr>
886+
<td>Alias</td>
887+
<td></td>
888+
</tr>
889+
<tr>
890+
<td>Required</td>
891+
<td>False</td>
892+
</tr>
893+
<tr>
894+
<td>Pipeline</td>
895+
<td>false</td>
896+
</tr>
897+
<tr>
898+
<td>Default Value</td>
899+
<td>False</td>
900+
</tr>
901+
</tbody>
902+
</table>
852903
<h5 id="autocreatetable">-AutoCreateTable</h5>
853904
<p>Automatically creates the destination table if it doesn't exist, using the same structure as the source table.<br />
854905
Essential for initial data migrations or when copying to new environments where destination tables haven't been created yet.<br></p>

Export-DbaDacPackage.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,11 @@ <h1 id="export-dbadacpackage">Export-DbaDacPackage</h1>
485485
<br>
486486
Want to see the Bill Of Health for this command? Check out <a href="https://dataplat.github.io/boh#Export-DbaDacPackage">Export-DbaDacPackage</a>.</p>
487487
<h2 id="synopsis">Synopsis</h2>
488-
<p>Creates DACPAC or BACPAC deployment packages from SQL Server databases using SqlPackage</p>
488+
<p>Exports DACPAC or BACPAC packages from SQL Server databases using the DacFx framework</p>
489489
<h2 id="description">Description</h2>
490-
<p>Creates database deployment packages for version control, migrations, and schema distribution. Generates DACPAC files containing database schema definitions or BACPAC files that include both schema and data. This automates the SqlPackage utility so you don't have to remember complex command-line syntax or manage connection strings manually.</p>
490+
<p>Creates database deployment packages for version control, migrations, and schema distribution. Generates DACPAC files containing database schema definitions or BACPAC files that include both schema and data.</p>
491491
<p>Perfect for creating deployable packages from development databases, capturing schema snapshots for source control, or preparing migration artifacts for different environments. The function handles multiple databases in batch operations and provides flexible table filtering when you only need specific objects.</p>
492-
<p>Uses Microsoft DAC Services under the hood with automatic SqlPackage installation if needed. Note that extraction can fail with three-part references to external databases or complex cross-database dependencies.</p>
492+
<p>Uses Microsoft DacFx API from dbatools.library. Note that extraction can fail with three-part references to external databases or complex cross-database dependencies.</p>
493493
<p>For help with the extract action parameters and properties, refer to <a href="https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-extract">https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-extract</a></p>
494494
<h2 id="syntax">Syntax</h2>
495495
<pre><code>Export-DbaDacPackage -SqlInstance &lt;DbaInstanceParameter[]&gt;
@@ -543,8 +543,8 @@ <h5 id="example-4">Example: 4</h5>
543543
<pre><code>PS C:\&gt; $moreparams = &quot;/OverwriteFiles:$true /Quiet:$true&quot;
544544
PS C:\&gt; Export-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config -Path C:\temp -ExtendedParameters $moreparams
545545
</code></pre>
546-
<p>Using extended parameters to over-write the files and performs the extraction in quiet mode to C:\temp\sql2016-SharePoint_Config-20201227140759-dacpackage.dacpac. Uses command line instead of SMO <br>
547-
behind the scenes. As noted the generated filename will contain the server name, database name, and the current timestamp in the &quot;%Y%m%d%H%M%S&quot; format.<br></p>
546+
<p>Using extended parameters to over-write the files and performs the extraction in quiet mode to C:\temp\sql2016-SharePoint_Config-20201227140759-dacpackage.dacpac. Uses SqlPackage.exe command line <br>
547+
instead of DacFx API behind the scenes. As noted the generated filename will contain the server name, database name, and the current timestamp in the &quot;%Y%m%d%H%M%S&quot; format.<br></p>
548548
<h3 id="required-parameters">Required Parameters</h3>
549549
<h5 id="sqlinstance">-SqlInstance</h5>
550550
<p>The target SQL Server instance or instances. Must be SQL Server 2008 R2 or higher (DAC Framework minimum version 10.50). <br></p>
@@ -780,7 +780,8 @@ <h5 id="dacoption">-DacOption</h5>
780780
</table>
781781
<h5 id="extendedparameters">-ExtendedParameters</h5>
782782
<p>Passes additional command-line parameters directly to SqlPackage.exe for advanced scenarios (e.g., '/OverwriteFiles:true /Quiet:true').<br />
783-
Use this when you need SqlPackage options not available through DacOption or when integrating with existing SqlPackage workflows.<br></p>
783+
Use this when you need SqlPackage options not available through DacOption or when integrating with existing SqlPackage workflows.<br />
784+
Note: This parameter requires SqlPackage.exe to be installed via Install-DbaSqlPackage or locally.<br></p>
784785
<table>
785786
<thead>
786787
<tr>
@@ -809,7 +810,8 @@ <h5 id="extendedparameters">-ExtendedParameters</h5>
809810
</table>
810811
<h5 id="extendedproperties">-ExtendedProperties</h5>
811812
<p>Passes additional property settings directly to SqlPackage.exe for fine-tuned control over extraction behavior.<br />
812-
Use this when you need to set specific SqlPackage properties that aren't exposed through the standard DacOption parameter.<br></p>
813+
Use this when you need to set specific SqlPackage properties that aren't exposed through the standard DacOption parameter.<br />
814+
Note: This parameter requires SqlPackage.exe to be installed via Install-DbaSqlPackage.<br></p>
813815
<table>
814816
<thead>
815817
<tr>

Get-DbaDbUdf.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,9 @@ <h1 id="get-dbadbudf">Get-DbaDbUdf</h1>
485485
<br>
486486
Want to see the Bill Of Health for this command? Check out <a href="https://dataplat.github.io/boh#Get-DbaDbUdf">Get-DbaDbUdf</a>.</p>
487487
<h2 id="synopsis">Synopsis</h2>
488-
<p>Retrieves User Defined Functions from SQL Server databases with filtering and metadata</p>
488+
<p>Retrieves User Defined Functions and User Defined Aggregates from SQL Server databases with filtering and metadata</p>
489489
<h2 id="description">Description</h2>
490-
<p>Retrieves all User Defined Functions (UDFs) from one or more SQL Server databases, returning detailed metadata including schema, creation dates, and data types. This function helps DBAs inventory custom database logic, analyze code dependencies during migrations, and audit user-created functions for security or performance reviews. You can filter results by database, schema, or function name, and exclude system functions to focus on custom business logic.</p>
490+
<p>Retrieves all User Defined Functions (UDFs) and User Defined Aggregates from one or more SQL Server databases, returning detailed metadata including schema, creation dates, and data types. This function helps DBAs inventory custom database logic, analyze code dependencies during migrations, and audit user-created functions for security or performance reviews. You can filter results by database, schema, or function name, and exclude system functions to focus on custom business logic.</p>
491491
<h2 id="syntax">Syntax</h2>
492492
<pre><code>Get-DbaDbUdf
493493
[-SqlInstance] &lt;DbaInstanceParameter[]&gt;
@@ -509,23 +509,23 @@ <h2 id="examples">Examples</h2>
509509
<h5 id="example-1">Example: 1</h5>
510510
<pre><code>PS C:\&gt; Get-DbaDbUdf -SqlInstance sql2016
511511
</code></pre>
512-
<p>Gets all database User Defined Functions<br></p>
512+
<p>Gets all database User Defined Functions and User Defined Aggregates<br></p>
513513
<h5 id="example-2">Example: 2</h5>
514514
<pre><code>PS C:\&gt; Get-DbaDbUdf -SqlInstance Server1 -Database db1
515515
</code></pre>
516-
<p>Gets the User Defined Functions for the db1 database<br></p>
516+
<p>Gets the User Defined Functions and User Defined Aggregates for the db1 database<br></p>
517517
<h5 id="example-3">Example: 3</h5>
518518
<pre><code>PS C:\&gt; Get-DbaDbUdf -SqlInstance Server1 -ExcludeDatabase db1
519519
</code></pre>
520-
<p>Gets the User Defined Functions for all databases except db1<br></p>
520+
<p>Gets the User Defined Functions and User Defined Aggregates for all databases except db1<br></p>
521521
<h5 id="example-4">Example: 4</h5>
522522
<pre><code>PS C:\&gt; Get-DbaDbUdf -SqlInstance Server1 -ExcludeSystemUdf
523523
</code></pre>
524-
<p>Gets the User Defined Functions for all databases that are not system objects (there can be 100+ system User Defined Functions in each DB)<br></p>
524+
<p>Gets the User Defined Functions and User Defined Aggregates for all databases that are not system objects (there can be 100+ system User Defined Functions in each DB)<br></p>
525525
<h5 id="example-5">Example: 5</h5>
526526
<pre><code>PS C:\&gt; 'Sql1','Sql2/sqlexpress' | Get-DbaDbUdf
527527
</code></pre>
528-
<p>Gets the User Defined Functions for the databases on Sql1 and Sql2/sqlexpress<br></p>
528+
<p>Gets the User Defined Functions and User Defined Aggregates for the databases on Sql1 and Sql2/sqlexpress<br></p>
529529
<h3 id="required-parameters">Required Parameters</h3>
530530
<h5 id="sqlinstance">-SqlInstance</h5>
531531
<p>The target SQL Server instance or instances <br></p>

0 commit comments

Comments
 (0)