Skip to main content

Posts

Showing posts from July, 2020

Managing Windows Credentials with Powershell

1) Download Credman from  https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Credentials-d44c3cde It uses Advapi32.dll   2)  To add a Cred, the syntax is  .\CredMan.ps1 -AddCred -Target 'SERVER' -User 'domain\xxxxxx' -Pass 'xxxxxxxx' -CredType 'DOMAIN_PASSWORD' Notes 'SERVER' can include the single hostname or FQDN plus the desired port   

Regex - Dealing with Groups, C#

Just say you have a string like this one.... Job Posting: 10 Jul 2020 - Closing Date: 26 Jul 2020 Land Administration Legal and Justice Regulatory and Compliance Central & North Coasts Job Title: Senior Analyst Native Title Job Grade / Classification: Clerk Grade 9/10 Employment Type: Temporary role for 24 months Location: Negotia...   and you want to insert a new line after the date, 26 Jul 2020.  Details = " Job Posting: 10 Jul 2020 - Closing Date: 26 Jul 2020 Land Administration Legal and Justice Regulatory and Compliance Central & North Coasts Job Title: Senior Analyst Native Title Job Grade / Classification: Clerk Grade 9/10 Employment Type: Temporary role for 24 months Location: Negotia...   ";    Regex r1 = new Regex( @"(.*Closing Date: \d\d [A-Za-z]* \d\d\d\d)(.*)" ); Match match = r1.Match(Details); if (match.Success && match.Groups.Count == 3 ) { j.JobDates = match.Groups[ 1 ].Value.Trim(); j.Details = match.Gro

Ports Used by MSSQL

https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-ver15 Ports Used By the Database Engine By default, the typical ports used by SQL Server and associated database engine services are: TCP  1433 ,  4022 ,  135 ,  1434 , UDP  1434 Ports Used By Integration Services The Integration Services service uses DCOM on port 135 Ports Used By Analysis Services By default, the typical ports used by SQL Server Analysis Services and associated services are: TCP  2382 ,  2383 ,  80 ,  443 Ports Used By Reporting Services By default, the typical ports used by SQL Server Reporting SErvices and associated services are: TCP  80 ,  443