Monday, 20 January 2020

ADFS ERROR : ADMIN0017 ADFS ERROR : An error occured during an attempt to access the ADFS Configuration Database:



ADFS ERROR :  ADMIN0017
ADFS ERROR :  An error occured during an attempt to access the ADFS Configuration Database:

ADFS ERROR :  An error occured during an attempt to access the ADFS Configuration Database:
Error Message: ADMIN0017: An Exception Occured while Connecting to the configuration Service. the configuration service URL 'net.tcp://localhost:1500/policy' may be incorrect or the ADFS Windows service is not running.

I came across this error message in my lab set up as today as I was trying to add a new Relying party trust.

IDP page is also not working, there were no options in ADFS Consile in the left hand side.

I just restarted the ADFS service,

 IDP started working and the options to came up.

if this doesnt work, for WID service in services and ADFS service re-enter the password for te service account.

please comment if this helped you as well!


Wednesday, 1 January 2020

Azure AD Connect : PowerShell script to check the AD Connect Password Sync status and send E-mail to Admins


Hello All,

Here is the PowerShell script to send an email to DL about the status of the password sync in a CSV.

Here i have used Get-MsolCompanyInformation.
this gives details like,
last sync time
last password sync time
technical notification email
service account used to perform the sync.

this has to be run on the AD Connect server with elevated rights.
before  running, get-msolcompany information you need to connect to azure.
so open PowerShell with admin rights,
run Connect -msolservice ( in the pop up enter the Global admin credentials)
now run the below script, this store the csv file in the path and also send an email to the address specified.

You can also store the encrypted creds in the script. this is an easy way.

post your suggestions and thoughts in the comments



###########AD CONNECT  PASSWORD SYNC STATUS######## 

$fromaddress = "user@abc.com" 
$toaddress = "adminDL@abc.com" 
 $ADConnect = get-MsolCompanyInformation >\\"path to write the output in csv"\ADC.csv
 $body =   "Please Find the Sync Scheduler info of AD CONNECT attached in the CSV and take actions if necessary. THANK YOU!!" 
 $date = get-date
$Subject = " $date : Pls See the state of AD Connect Sync" 

$attachment = "\\"path of the folder whee teh output csv is located"\Documents\11\ADC.csv" 
$smtpserver = "SMTP.abc.com" 

#################################### 

$message = new-object System.Net.Mail.MailMessage $message.From = $fromaddress
$message.To.Add($toaddress)
###############################################



$message.Subject = $Subject
$attach = new-object Net.Mail.Attachment($attachment)
$message.Attachments.Add($attach)
$message.body = $body 

$smtp = new-object Net.Mail.SmtpClient($smtpserver)
$smtp.Send($message) 

 வாழ்க்கை முழுவதைம் அள்ளிச்சென்ற  பின்,   கனவில்  மட்டும்  வந்து   ஏன் இன்பம்  காட்டுகிறாய்... கனவு கலைந்ததும்  உண்மை  வாட்டுகிறது... கனவாவத...