CompanyFile Parameter (Connect-QB Cmdlet)
Specifies the QuickBooks company file the provider uses during the connection.
Syntax
Connect-QB -CompanyFile string
Data Type
cstr
Default Value
""
Remarks
Set this property to define the QuickBooks CompanyFile for the connection. When QuickBooks is not already running, the cmdlet launches QuickBooks and opens the specified file in the background. If QuickBooks is already running, the cmdlet uses the currently open CompanyFile. Specifying a different file in this case results in an error.
For remote connections, this property is ignored. Instead, specify the CompanyFile when creating the QuickBooks Gateway user. Ensure the file path is correct and accessible to avoid connection issues.