CJSmith dot me

I dump stuff I find useful here

Simple method to see what AD Users SQL Server can see in AD Groups

Published / by Chris Smith / Leave a Comment

Credit: Microsoft StackOverflow user Saranya Kumaran Simple method to see what AD Users SQL Server can see in AD Groups exec xp_logininfo ‘Domain/AD Group’, ‘all’ exec xp_logininfo ‘Domain/AD Group’, ‘members’ Notes: Non ad group first command returns error, second command returns no output Msg 15404, Level 16, State 10, Procedure xp_logininfo, Line 64 [Batch Start […]

Powershell script to manage V1 dbadeposit issues in pull config

Published / by Chris Smith / Leave a Comment

Credits: Superuser Microsoft Docs V1 dbadeposit can exit and stop working when in a pull configuration (Normally V1 dbadeposit is setup in a push to configuration) if a tag file (Metadata) is not produced along with the arq file and binary blob file. If you check and find you are actually missing no scans like […]

Maximum History Reached in Code & Post Registered Invoices

Published / by Chris Smith / Leave a Comment

Credit: Datel Code & Post Registered Invoices has a database limit on the plreghstm table and can hold 79 rows before displaying the error Maximum History Reached (Even though the field supports 4 characters). The last row holds a ~ (Tilda) in the page number field causing the error message and subsequently the automation routine […]

Microsoft Message Queuing Service – Correct Permission Issue

Published / by Chris Smith / Leave a Comment

Credit: Aggregated Intelligence We had a request after software was installed to give permissions to a group in Windows AD. This was failing because the only account with access was the SYSTEM account When making any changes it would fail with 2 errors On the permission screen click Advanced, change the location to the local […]

Sage Line 500 password policy implementation and force password reset

Published / by Chris Smith / Leave a Comment

I wrote a simple script to aid users moving to a new password policy, users were put on a policy which would expire a password after a day. Once they had changed their password the policy is amended to the new policy. I now use this for forcing password resets. Replace and with your Sage […]

Test Pop3

Published / by Chris Smith / Leave a Comment

Pop3 can be tested via Command line using the telnet executable (Will need to be selected from Windows features). Telnet to the Pop3 server in question, this will test Pop3 is accessible, then enter the username and password. As long as the status is OK then it should work. If not the error should provide […]

My Windows 10 Desktop Settings

Published / by Chris Smith / Leave a Comment

I hate the default Windows settings, I normally run the following to customise the profile to my liking (I don’t like programs grouped and like to see seconds on the clock, I like to show all folders in Explorer, launch Explorer to This PC not Quick Access) ;https://ss64.com/nt/syntax-reghacks.html Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 […]

Remove document protection from PDF files for ABBYY FineReader Engine 10 SDK

Published / by Chris Smith / Leave a Comment

We came across an issue where PDF’s with any sort of protection failed to process via ABBYY FineReader Engine 10 SDK. The PDF’s were placed in a network share and then failed to process. To get around this I implemented a program called Foldermill (Which has a trial to test it with and a very […]

Remove invalid Datalinx WHM Report Records

Published / by Chris Smith / Leave a Comment

Where printers have been removed can cause issues with the user report program where you can control where users print to. The code below simply looks at the printer table and compares with the report control table. BEGIN TRAN –Check number of records which have invalid printers SELECT * FROM “scheme”.”wh_rctl” WHERE NOT EXISTS (SELECT […]