Skip to content

Commit 4d26acf

Browse files
authored
Fix Output of initial objects that are found. Now a table
1 parent 6e96fdf commit 4d26acf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Powershell/Erase-BaseManagedEntity.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
.NOTES
3030
.AUTHOR
3131
Blake Drumm (blakedrumm@microsoft.com)
32-
32+
33+
.CREATED
34+
April 10th, 2021
35+
3336
.MODIFIED
3437
December 2nd, 2021
3538
#>
@@ -68,7 +71,6 @@ param
6871
#----------------------------------------------------------------------------------------------------------------------------------
6972
#-Requires: SQL Server Powershell Module (https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module)
7073
#Author: Blake Drumm (blakedrumm@microsoft.com)
71-
#Date Created: 4/10/2021
7274
function Invoke-SqlCommand
7375
{
7476
<#
@@ -431,7 +433,7 @@ ORDER BY FullName
431433

432434
Write-Host "Found the following data associated with: " -NoNewline
433435
Write-Host $machine -ForegroundColor Green
434-
$BME_IDs | Select FullName, DisplayName, Path, IsDeleted, BaseManagedEntityId
436+
$BME_IDs | Select FullName, DisplayName, Path, IsDeleted, BaseManagedEntityId | ft * -AutoSize | Out-String -Width 4096
435437
$count = $BME_IDs.Count
436438
if (!$yes)
437439
{
@@ -540,7 +542,7 @@ if ($ManagementServer -or $SqlServer -or $Database -or $Servers -or $AssumeYes -
540542
}
541543
else
542544
{
543-
<# Edit line 547 to modify the default command run when this script is executed.
545+
<# Edit line 549 to modify the default command run when this script is executed.
544546
Example:
545547
Erase-BaseManagedEntity -ManagementServer MS1-2019.contoso.com -SqlServer SQL-2019\SCOM2019 -Database OperationsManager -Servers Agent1.contoso.com, Agent2.contoso.com
546548
#>

0 commit comments

Comments
 (0)