This is Denny, the creator of this free automated employee
provisioning/termination app– Z-hire. I wrote this app for the TechNet community a year ago.
Since you run a very informative blog, I would like your help
spread the word. Since my application is free, i need supporters from the
community. It would means a lot if you can help.
But I still have the problem too.
Claims Based and IFD certificate has been updated successfully. ADFS Relying Party Trust occur down. Test federation metadata, it is fail. The error message in event view is The RSA key used to encrypt the RSA cookie was not found in the given decryption keys.
I did configure the certificate as the secondary “Token Signing” certificate in ADFS management, it is still error.
I am also receiving that same error message when running it on server 2008 R2 SP1 64bit. Fresh from a download, only edited the XML file with the options that pertain to my environment. Did not edit the .ps1 file at all.
I’ve also just tried it on a windows 2008 R2 Server with Powershell 3.0 and a Windows 2012 R2 Server with Powershell 4.0. On both of those there are some errors, but the script continues to run. It writes the output to screen and .csv file correctly but it ALWAYS runs in TEST mode no matter what you specify for the executionMode. Running with and without the -force option results in TEST (NO MAILINGS) even when execution mode is set to DEV.
Powershell 3.0/4.0 Errors:
Property ‘Width’ cannot be found on this object; make sure it exists and is settable.
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:212 char:2
+ $uiConfigScreenSize.Width = $uiConfigScreenSizeMaxWidth
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Property ‘Height’ cannot be found on this object; make sure it exists and is settable.
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:217 char:2
+ $uiConfigScreenSize.Height = $uiConfigScreenSizeMaxHeight – 5
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Exception setting “WindowSize”: “Cannot convert null to type “System.Management.Automation.Host.Size”.”
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:222 char:1
+ $uiConfig.WindowSize = $uiConfigScreenSize
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
+ FullyQualifiedErrorId : ExceptionWhenSetting
based upon your mail, you would need to adjust the filter of the query to target expiring accounts. However, do you really want to mail a user their account will expire? I do not think that’s a user’s problem, but rather the problem of the user’s manager (who knows when the user will actually stop working)
You need PowerShell scripting skills to adjust this script or see if you can find a script that fits your needs in the scripting gallery on technet
regards,
Jorge
Hi Jorge, I appreciate your blog. I have a question for you, I’m trying to move our ADFS 2.0 DB from one SQL server to another SQL server. Pretty straight forward. I’ve found these highly referenced instructions https://social.technet.microsoft.com/wiki/contents/articles/948.ad-fs-2-0-migrate-your-ad-fs-configuration-database-to-sql-server.aspx but those are to move off WID to SQL. I found this msdn post where I believe you replied to his post, what I’m not sure of is it isn’t clear if you’re saying the ONLY things that need to be followed are step 5 and 7? I’ve been tasked with this move and am not really familiar with SQL or ADFS so I’m trying to make certain I know what steps I need to take, exactly. Thanks for any light you can shed on this for me.
When moving from on SQL server to another SQL server
On ADFS servers you need to:
* Stop the ADFS service
* Extract the connection string in use by ADFS for the config DB (you do not need this, but you may need when rolling back)
On the target SQL you need to:
* Create the login used by ADFS
On the source SQL you need to:
* Detach the config and artifact database
* COPY the database files over to the target SQL server
On the target SQL you need to:
* attach the config and artifact database
* Make sure every database has the Broker enabled
On ONE ADFS server you need to:
* Update the connection string to target the new SQL server
* Start the ADFS service
* Update the connection string for the artifact database
* REstart the ADFS service
On REMAINING ADFS servers you need to:
* Update the connection string to target the new SQL server
* Start the ADFS service
(2011-06-14) Oh My Blog – How Much I Have Neglected You! « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLiked by 1 person
Brajesh Panda said
Jorge, I am very much impressed with your blog contents. Loving it!!
LikeLike
Pictures Temporarily Not Available On my Blog « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
Denny said
Hi Jorge,
This is Denny, the creator of this free automated employee
provisioning/termination app– Z-hire. I wrote this app for the TechNet community a year ago.
Since you run a very informative blog, I would like your help
spread the word. Since my application is free, i need supporters from the
community. It would means a lot if you can help.
Here is a link to my app
http://gallery.technet.microsoft.com/Z-Hire-Employee-Provisionin-e4854d6b
Thanks
LikeLike
Jorge said
it took some time…but I have published a blog post about this tool
LikeLike
josh said
I use LinkedIn to keep track of my professional network, and would like to add you.
I have problem for ADFS certificate renew.
I read your blog https://jorgequestforknowledge.wordpress.com/category/active-directory-federation-services-adfs/
But I still have the problem too.
Claims Based and IFD certificate has been updated successfully. ADFS Relying Party Trust occur down. Test federation metadata, it is fail. The error message in event view is The RSA key used to encrypt the RSA cookie was not found in the given decryption keys.
I did configure the certificate as the secondary “Token Signing” certificate in ADFS management, it is still error.
– josh zhang
LikeLike
(2015-03-24) Notifying Users By E-mail Their Password Is Going To Expire (Update 1) « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
(2015-04-29) Notifying Users By E-mail Their Password Is Going To Expire (Update 2) « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
Paul said
Hi Jorge
Thanks for your script however I am getting the following error.
Missing closing ‘)’ in expression.
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:80 char:2
+ <<<< [string]$xmlconfigfilepath,
+ CategoryInfo : ParserError: (CloseParenToken:TokenId) [], ParseException
+ FullyQualifiedErrorId : MissingEndParenthesisInExpression
Thanks
LikeLike
Jorge said
I just download the script through the provided link, executed it, and ran without the error you mention. Are you using the latest version?
LikeLike
Michael said
I am also receiving that same error message when running it on server 2008 R2 SP1 64bit. Fresh from a download, only edited the XML file with the options that pertain to my environment. Did not edit the .ps1 file at all.
LikeLike
Michael said
I’ve also just tried it on a windows 2008 R2 Server with Powershell 3.0 and a Windows 2012 R2 Server with Powershell 4.0. On both of those there are some errors, but the script continues to run. It writes the output to screen and .csv file correctly but it ALWAYS runs in TEST mode no matter what you specify for the executionMode. Running with and without the -force option results in TEST (NO MAILINGS) even when execution mode is set to DEV.
Powershell 3.0/4.0 Errors:
Property ‘Width’ cannot be found on this object; make sure it exists and is settable.
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:212 char:2
+ $uiConfigScreenSize.Width = $uiConfigScreenSizeMaxWidth
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Property ‘Height’ cannot be found on this object; make sure it exists and is settable.
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:217 char:2
+ $uiConfigScreenSize.Height = $uiConfigScreenSizeMaxHeight – 5
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Exception setting “WindowSize”: “Cannot convert null to type “System.Management.Automation.Host.Size”.”
At C:\AD-Pwd-Exp-Notify\AD-Pwd-Exp-Notify_v016.ps1:222 char:1
+ $uiConfig.WindowSize = $uiConfigScreenSize
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
+ FullyQualifiedErrorId : ExceptionWhenSetting
Powershell 2.0 Error:
Missing closing ‘)’ in expression.
At C:\ad-pwd-exp-notify\AD-Pwd-Exp-Notify_v016.ps1:80 char:2
+ <<<< [string]$xmlconfigfilepath,
+ CategoryInfo : ParserError: (CloseParenToken:TokenId) [], ParseException
+ FullyQualifiedErrorId : MissingEndParenthesisInExpression
LikeLike
Jorge said
Hi,
See if the following will work for you:
https://jorgequestforknowledge.wordpress.com/2015/09/22/2015-09-22-notifying-users-by-e-mail-their-password-is-going-to-expire-update-3/
regards,
Jorge
LikeLike
(2015-09-22) Notifying Users By E-mail Their Password Is Going To Expire (Update 3) « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
(2015-10-18) Notifying Users By E-mail Their Password Is Going To Expire (Update 4) « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
Dan said
Hi,
I’d like to adapt the script to email users who accounts are expiry not passwords, not sure where to start.
Any advice?
Thanks,
Dan
LikeLike
Jorge said
I do not know what you want to adapt. If you try to explain it to me I may be able to give avice
regards,
jorge
LikeLike
Jorge said
based upon your mail, you would need to adjust the filter of the query to target expiring accounts. However, do you really want to mail a user their account will expire? I do not think that’s a user’s problem, but rather the problem of the user’s manager (who knows when the user will actually stop working)
You need PowerShell scripting skills to adjust this script or see if you can find a script that fits your needs in the scripting gallery on technet
regards,
Jorge
LikeLike
Dan said
Would like to adapt the script to notify users whose accounts are expiring, not really sure how to adapt.
Any advice?
Dan
LikeLike
Jorge said
I do not know what you want to adapt. If you try to explain it to me I may be able to give avice
regards,
jorge
LikeLike
(2016-05-09) Notifying Users By E-mail Their Password Is Going To Expire (Update 5) « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
(2016-07-24) Fixing Web Content Data In ADFS 2012 R2 (v3.0) When Leveraging WID As A Database Store « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
(2016-09-25) FIM/MIM Configuration Export Scripts « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike
Arnaud said
This is a really great blog!!!!
LikeLike
klutch14u said
Hi Jorge, I appreciate your blog. I have a question for you, I’m trying to move our ADFS 2.0 DB from one SQL server to another SQL server. Pretty straight forward. I’ve found these highly referenced instructions https://social.technet.microsoft.com/wiki/contents/articles/948.ad-fs-2-0-migrate-your-ad-fs-configuration-database-to-sql-server.aspx but those are to move off WID to SQL. I found this msdn post where I believe you replied to his post, what I’m not sure of is it isn’t clear if you’re saying the ONLY things that need to be followed are step 5 and 7? I’ve been tasked with this move and am not really familiar with SQL or ADFS so I’m trying to make certain I know what steps I need to take, exactly. Thanks for any light you can shed on this for me.
LikeLike
klutch14u said
Sorry, couldn’t figure out how to edit my post and realized I forgot the post you replied in that I mentioned. https://social.msdn.microsoft.com/Forums/vstudio/en-US/3c851a13-24d9-4532-b09a-67bf49742489/adfs-20-move-configuration-database-from-one-sql-to-another-sql-server?forum=Geneva
LikeLike
Jorge said
When moving from on SQL server to another SQL server
On ADFS servers you need to:
* Stop the ADFS service
* Extract the connection string in use by ADFS for the config DB (you do not need this, but you may need when rolling back)
On the target SQL you need to:
* Create the login used by ADFS
On the source SQL you need to:
* Detach the config and artifact database
* COPY the database files over to the target SQL server
On the target SQL you need to:
* attach the config and artifact database
* Make sure every database has the Broker enabled
On ONE ADFS server you need to:
* Update the connection string to target the new SQL server
* Start the ADFS service
* Update the connection string for the artifact database
* REstart the ADFS service
On REMAINING ADFS servers you need to:
* Update the connection string to target the new SQL server
* Start the ADFS service
That’s it
Best Regards,
jorge
LikeLike
Robert Waltercrantz said
Good to see you’re back to blogging !!!
LikeLike
Jorge said
Thank you!
LikeLike
(2018-12-30) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs « Jorge's Quest For Knowledge! said
[…] Contact […]
LikeLike