EvotecIT/PSWinReporting

MS SQL Output: Error occured (Send-SqlInsert)

Adecosta1 opened this issue · 2 comments

Do i need to install a SQL express? got the following errors?

am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
[2022-08-05 16:57:43] [i] MS SQL Output: IF NOT EXISTS ( SELECT 1 FROM  dbo.[Events]  WHERE [DomainController] = 'AD1-adc01.domain.com' AND [EventRecordID] = '144945
6008' ) BEGIN INSERT INTO  dbo.[Events] ( [DomainController],[Action],[ComputerLockoutOn],[UserAffected],[ReportedBy],[EventWhen],[EventID],[EventRecordID],[
GatheredFrom],[GatheredLogName],[EventAdded],[EventAddedWho] ) VALUES ( 'AD1-adc01.domain.com','A user account was locked out.','LPTH1YHWZ2
','prakam001','PROD\AD1-ADC01$','2022-08-05 16:22:03','4740','1449456008','AD1-adc01.domain.com','Security','2022-08-05 16:57:42','
001admin' ) END
[2022-08-05 16:57:43] [i] MS SQL Output: Error occured (Send-SqlInsert): The term 'Invoke-DbaQuery' is not recognized as the name of a cmdlet, function, script file, or operable progr
am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
[2022-08-05 16:57:43] [i] MS SQL Output: IF NOT EXISTS ( SELECT 1 FROM  dbo.[Events]  WHERE [DomainController] = 'wbl-adc02.domain.com' AND [EventRecordID] = '604598
901' ) BEGIN INSERT INTO  dbo.[Events] ( [DomainController],[Action],[ComputerLockoutOn],[UserAffected],[ReportedBy],[EventWhen],[EventID],[EventRecordID],[G
atheredFrom],[GatheredLogName],[EventAdded],[EventAddedWho] ) VALUES ( 'wbl-adc02.domain.com','A user account was locked out.','LPT3TX5L72'
,'BoehmTi','PROD\WBL-ADC02$','2022-08-05 16:31:00','4740','604598901','wbl-adc02.domain.com','Security','2022-08-05 16:57:42','a
dmin' ) END
[2022-08-05 16:57:43] [i] MS SQL Output: Error occured (Send-SqlInsert): The term 'Invoke-DbaQuery' is not recognized as the name of a cmdlet, function, script file, or operable progr
am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
[2022-08-05 16:57:43] [i] MS SQL Output: IF NOT EXISTS ( SELECT 1 FROM  dbo.[Events]  WHERE [DomainController] = 'AD1-adc01.domain.com' AND [EventRecordID] = '144958
7598' ) BEGIN INSERT INTO  dbo.[Events] ( [DomainController],[Action],[ComputerLockoutOn],[UserAffected],[ReportedBy],[EventWhen],[EventID],[EventRecordID],[
GatheredFrom],[GatheredLogName],[EventAdded],[EventAddedWho] ) VALUES ( 'AD1-adc01.domain.com','A user account was locked out.','LPT3TX5L72
','BoehmTi','PROD\AD1-ADC01$','2022-08-05 16:33:01','4740','1449587598','AD1-adc01.domain.com','Security','2022-08-05 16:57:42','00
1admin' ) END`

You need to have DbaTools (PowerShell module) for SQL functionality. SQL Express or any SQL is required but for the database to exist.