Thor Logo dbatools

CIM

Get-DbaCmConnection

Friedrich Weinmann (@FredWeinmann)

Get-DbaCmConnection View Source Friedrich Weinmann (@FredWeinmann) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves cached Windows Management and CIM connections used by dbatools commands Description Shows which remote computer connections are currently cached by dbatools for Windows Management and CIM operations. This helps you understand what authentication contexts are active and troubleshoot connection issues when running dbatools commands against remote SQL Server instances.

Read more

Get-DbaCmObject

Friedrich Weinmann (@FredWeinmann)

Get-DbaCmObject View Source Friedrich Weinmann (@FredWeinmann) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves Windows system information from SQL Server hosts using WMI/CIM with intelligent connection fallback. Description Queries Windows Management Instrumentation (WMI) or Common Information Model (CIM) classes on SQL Server hosts to gather system-level information like hardware specs, operating system details, services, and performance counters. This function automatically tries multiple connection protocols in order of preference (CIM over WinRM, CIM over DCOM, WMI, then WMI over PowerShell Remoting) and remembers which methods work for each server to optimize future connections.

Read more

Get-DbaUptime

Stuart Moore (@napalmgram), stuart-moore.com

Get-DbaUptime View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves uptime information for SQL Server instances and their hosting Windows servers Description This function determines SQL Server uptime by checking the tempdb creation date and calculates Windows server uptime using CIM/WMI calls to get the last boot time. Essential for monitoring system stability, troubleshooting unexpected restarts, and generating compliance reports that require uptime documentation.

Read more

New-DbaCmConnection

New-DbaCmConnection View Source Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Creates and configures connection objects for remote computer management using CIM/WMI protocols. Description Creates connection objects that optimize remote computer management for SQL Server environments using CIM and WMI protocols. These objects cache successful authentication methods and connection protocols, reducing authentication errors and improving performance when connecting to multiple SQL Server instances across different servers.

Read more

Remove-DbaCmConnection

Friedrich Weinmann (@FredWeinmann)

Remove-DbaCmConnection View Source Friedrich Weinmann (@FredWeinmann) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Removes cached Windows Management and CIM connections from the dbatools connection cache. Description Clears cached connection objects that dbatools uses for remote computer management operations like accessing Windows services, registry, and file systems on SQL Server instances. When you run dbatools commands against remote servers, these connections are automatically created and cached to improve performance and reduce authentication overhead.

Read more

Set-DbaCmConnection

Friedrich Weinmann (@FredWeinmann)

Set-DbaCmConnection View Source Friedrich Weinmann (@FredWeinmann) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Configures remote computer connection settings for SQL Server host management. Description Configures connection objects that dbatools uses to manage remote SQL Server host computers via CIM, WMI, and PowerShell remoting. This function creates new connection records for computers not yet cached, or modifies existing connection settings for previously contacted hosts.

Read more

Test-DbaCmConnection

Friedrich Weinmann (@FredWeinmann)

Test-DbaCmConnection View Source Friedrich Weinmann (@FredWeinmann) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Tests remote computer management connectivity using multiple protocols and caches optimal connection methods Description Tests remote computer connectivity across four different management protocols to determine the most reliable connection method for SQL Server administration tasks. This function evaluates connectivity for: CIM over WinRM (Windows Remote Management) CIM over DCOM (Distributed Component Object Model) WMI (Windows Management Instrumentation) PowerShell Remoting Results are cached and automatically used by other dbatools commands like Get-DbaCmObject and Invoke-DbaCmMethod to optimize future connections.

Read more