Description:
All about Information Technology infrastructure and system. Helpdesk & support issue, deployment guide, and daily activity in managing an information technology operation.
Search This Blog
Tuesday, January 2, 2024
Another Error code 0x80070643 when installing Microsoft Defender for Identity sensor
Monday, September 25, 2023
Cannot Install PowerShell Module - Unable to find module repositories
Description:
You try to Install a new PowerShell Module. But you got an error saying "No match was found for the specified search criteria and module name ' ' Try Get-PSRepository to see all available registered module repositories". However when you try to run Get-PSRepository command you got "Unable to find module repositories error".
You have try the following, but still have the problem:
- Make sure to Run as Administrator,
- Make sure to use TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Unregister and Register
- Unregister-PSRepository -Name PSGallery
- Register-PSRepository -Default
Modifying AdminSDHolder Permission Delegation
department, use dsacls:Friday, August 25, 2023
Using Microsoft Graph to Find Inactive Guest Users in Azure Active Directory
Connect-MgGraph -Scopes "User.Read.All","AuditLog.Read.All"
#Logon using Global Admin
$guestUsers = Get-MgUser -Filter "userType eq 'Guest' and accountEnabled eq true" -Property DisplayName, UserPrincipalName, SignInActivity, CreatedDateTime
$inactiveGuestUsers = $guestUsers | Where-Object {($_.SignInActivity.LastSignInDateTime -lt (Get-Date).AddDays(-90)) -or ($_.SignInActivity.LastSignInDateTime -eq $null)}
# Display the list of inactive guest users
$inactiveGuestUsers | Select-Object DisplayName, UserPrincipalName, @{Name="LastSignInDateTime"; Expression={$_.SignInActivity.LastSignInDateTime}}, CreatedDateTime
Windows 2019 NPS Server Firewall Exclusion
Description:
You have completed the NPS configuration using Windows Server 2019. You have put the correct secrets at the VPN servers. You also have make sure there's no Network Firewall between the VPN server and NPS Server.
However client machine cannot connect to the VPN. And you cannot see the traffic reaching the NPS Server. There's nothing in the NPS Server event viewer.
Resolution:
At the NPS server, open command prompt with elevated permission and type:
sc sidtype IAS unrestricted
Restart the server after that.
Windows Defender Firewall on the NPS should be automatically configured with exceptions, during the installation of NPS, to allow this RADIUS traffic to be sent and received.
With Server 2019 this firewall exception requires a modification to the service account security identifier to effectively detect and allow RADIUS traffic. If this security identifier change is not executed, the firewall will drop RADIUS traffic. The above command changes the IAS (RADIUS) service to use a unique SID instead of sharing with other NETWORK SERVICE services.
Monday, July 24, 2023
Failed F5 Big-IQ connection to Azure MFA
You have setup Azure MFA with NPS Extension in your Organization. You have make sure the firewall from and to your NPS server is configure properly. You have also make sure the internet connection from NPS Server to Azure MFA is working properly
Now, you want to test the the connection from your F5 Big-IQ to the NPS Server. However you got an error saying "Failed while connecting to radius server, server responded with: Access-Challenge".
Go to NPS Server, open the Registry Editor.
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureMfa.
- Create the following String/Value pair:
- Name: OVERRIDE_NUMBER_MATCHING_WITH_OTP
- Value = FALSE
Saturday, March 11, 2023
Cannot Delete DNS Zone - Access was Denied
How to Fix "Trust Relationship Failed" error without Rejoin Domain
Description:
One of your users suddenly sees the error message "Trust Relationship Between This Workstation And The Primary Domain Failed" when trying to logon to their machine.
You have verify the Computer Account is exist on Active Directory. DNS settings are properly set and there's no problem with port or networking.
You wish to remediate the issue without having to disjoin and rejoin the computer to the domain.
Resolution:
On the problematic machine, logon using local admin credential. Open PowerShell and run as Administrator.
Type the following:
Reset-ComputerMachinePassword -Server DomainController -Credential
DomainAdmin
If the command completed successfully, logoff and try to logon again.
Sunday, March 5, 2023
Migrate from Windows Hello to Windows Hello For Business (WHFB)
You have deployed Windows Hello in the past to several machines in the organizations. Recently you got direction from Management to deploy Windows Hello For Business (WHFB) for your organization.
You have enable the Hybrid Cloud Kerberos trust and the configured required group policy. However, on the test machine, no WHFB got the prompt for provision. You have try to restart and make sure the WFHB group policy apply correctly.
Go to "Computer Configuration\Administrative Templates\System\Logon\Turn on convenience PIN sign-in". Make sure it is Disabled.
Multiple Prompt when creating Azure AD Kerberos Server object
Description:
You want to Deploy Windows Hello For Business with Hybrid Cloud Kerberos type in your environment.
You have met all the require prerequisites. However when trying to create Azure AD Kerberos Server object using below PowerShell command you encounter multiple prompt asking for Azure AD credential.
# Kerberos Server object will be created in this Active Directory domain.
$domain = $env:USERDNSDOMAIN
# Enter an Azure Active Directory global administrator username and password.
$cloudCred = Get-Credential -Message 'An Active Directory user who is a member of the Global Administrators group for Azure AD.'
# Enter a domain administrator username and password.
$domainCred = Get-Credential -Message 'An Active Directory user who is a member of the Domain Admins group.'
# Create the new Azure AD Kerberos Server object in Active Directory
# and then publish it to Azure Active Directory.
Set-AzureADKerberosServer -Domain $domain -CloudCredential $cloudCred -DomainCredential $domainCred
Resolution:
Make sure the Azure AD Global Administrator account that you are using during configuration are not included in any of Azure AD Conditional Access rules. You may also need to close the previous PowerShell session and try again.
Saturday, October 22, 2022
ADRMS and SharePoint IRM Integration Error - 0x80020009
Description:
You have configure ADRMS properly in your environment. Now you want to make SharePoint to use ADRMS. At the SharePoint Central Admin, you specify the location of the RMS Server.
However when you try to open a document protected with RMS, there's a pop-up error saying couldn't find the document. At the SharePoint event viewer you saw the following error:
Information Rights Management (IRM): There was a problem while ensure IRM client. Status value: -1, error value: 0x80020009.
[Information Rights Management (IRM): There was a problem while creating the generic issuance license template.
All issuance licenses for protected documents are constructed from a generic, base issuance license template.
Additional Data
Error value: 0x800704DC
Resolution:
Please go to the SharePoint Central Admin and make sure you already select or type in the correct RMS cluster server address. Use HTTPS instead of HTTP when typing the RMS cluster address.
Sample SQL Script to Update ADRMS Configuration Database during Parallels Upgrade
UPDATE [dbo].[DRMS_ClusterPolicies]
SET PolicyData = '' --(your new string with updated information goes between the ' ' )WHERE PolicyName='CertificationUserKeyStorageConnectionString' UPDATE [dbo].[DRMS_ClusterPolicies]SET PolicyData = '' --(your new string with updated information goes between the ' ' )WHERE PolicyName='DirectoryServicesCacheDatabase' UPDATE [dbo].[DRMS_ClusterPolicies]SET PolicyData = '' --(your new string with updated information goes between the ' ' )WHERE PolicyName='LoggingDatabaseServer'
Update AD RMS Config Database using SQL Server Management Studio during Parallels Upgrade
Description:
During AD RMS Parallels Upgrade, you need to modify the restored database to point to the new database servers.
Resolution:
- Log on to the AD RMS configuration database server as local Administrator or another user account that is a member of the local Administrators group.
- Click Start, point to All Programs, point to Microsoft SQL Server 2012, and then click SQL Server Management Studio.
- On the Connect to Server page, ensure that the new database server name is listed in the Server name box, and then click Connect.
- Expand Databases, expand DRMS_Config_<RMS cluster name>_<Port>, and then expand Tables.
- Right-click DRMS_ClusterPolicies, and then click Open Table.
- In the results pane, change the value in the PolicyData column of the LoggingDatabaseServer row to the new RMS database server name.
- Change the value in the PolicyData column of the CertificationUserKeyStorageConnectionString row to reflect the new database server. The value should be data source=<new database server name>;integrated where <new database server name> is the name of the new database server.
- Repeat steps 6–7 for the value in the PolicyData column of the DirectoryServicesCacheDatabase row.
- Close Microsoft SQL Server Management Studio.
Active Directory Rights Management Services - Parallels Upgrade
Description:
You have an Active Directory Rights Management Services (ADRMS) being deployed in your IT Environment. You need to upgrade the version of ADRMS, the Windows OS, and also the Database with minimal downtime and minimal risk to new Windows 2019 and SQL 2019 machines.
You decided to do a Parallel Upgrade.
Resolution:
You would need to perform the following:
- Prepare the new Windows 2019 OS and SQL 2019 Databases on different machines. Install all the necessary patches.
- Back up the existing AD RMS database.
- Restore the AD RMS databases to a new location (new instance, new SQL server, etc.).
- The following SQL changes must be made on the restored databases.
- Database: DRMS_Config
- Table: DRMS_ClusterPolicies
- PolicyName entries in which the PolicyData value needs to reflect the new SQL connection string information.
- LoggingDatabaseServer
- CertificationUserKeyStorageConnectionString
- DirectoryServicesCacheDatabase
- Built a new Windows Server of the desired version for the AD RMS cluster upgrade.
- Add the AD RMS role.
- When it gets to the role configuration choose the “join an existing cluster” option.
- At the SQL database dialog enter the NEWLY RESTORED SQL database location, not the actual production database currently in use.
- Complete the role configuration using all the same settings, service accounts, etc.
- Edit the NTFS permissions on new AD RMS server's "C:\inetpub\wwwroot\_wmcs\certification\ServerCertification.asmx" file. Configure the same permissions as on the existing AD RMS server.
Thursday, October 20, 2022
PowerShell Command to Identify Local Admin Account
Description:
You have several local account on your computer. One day, you need to find out which one is the real local Admin Account.
Resolution:
You can run the following PowerShell command on the local computer:
Get-CimInstance -ClassName Win32_UserAccount -Filter "LocalAccount = TRUE and SID like 'S-1-5-%-500'"
Friday, June 3, 2022
Cannot Publish or Missing Certificates Template
Description:
You created a certificate template in your Windows Enterprise CA. However when you want to publish it, you cannot saw the templates inside the "Enable Certificate Templates" wizard. All other Certification Authority function works normally and you've used the account which has proper permission.
Resolution:
Try to use the following command:
Certutil -setcatemplates +templatename
Note: The plus (+) sign is mandatory. Otherwise it will replace all of the other published template.
Error while creating Windows 2016 Cluster at "Find a suitable Domain Controller"
You want to create Windows 2016 cluster on Windows 2012 R2 Domain. You run the Wizard, however encountered error and the cluster cannot be created.
"Check whether the computer object "clustername" for node "hostnameFQDN" exists in the domain. More data is available".
"Failed to find suitable DC. Error 234"
"Searching for object "clustername" on first choice DC failed. Error 234"
"Couldn't resolve RPC binding to cluster, Status = 1753"
Resolution:
First, verified the DNS record in your DNS Server. Especially the record for all of your Domain Controllers. Make sure the Active Directory required Zones has the correct NS records, CNAME records, A Records, and also SRV DNS records. Remove the stale records for old or unknown broken Domain Controllers.
Second, check the Application partition (DomainDnsZone and ForestDnsZone) in your Active Directory. Use ADSIedit to connect to the application partition and try to browse the content. If you encountered error, you may need to delete the application partition using NTDSUtil.
Saturday, April 9, 2022
Error Event ID 345 on ADFS Server
Description:
You recently just upgraded your ADFS to newer OS version. After a while you notice Event ID 345 on one of the secondary ADFS server. It said "There was a communication error during AD FS configuration database synchronization. Synchronization of the data from primary federation server to a secondary federation server did not occur". You are sure that all of the network port requirement are met.
The previous ADFS upgrade process is somehow causing the farm behavior level (FBL) on the secondary server doesn't match with the FBL on the primary server.
We need to remove the ADFS role and WID database feature on the problematic secondary ADFS server. After that try to re-install the ADFS role and finish the post configuration.
The secondary server will then use the correct version of ADFS configuration database and synchronization will works as expected.
Thursday, February 3, 2022
DNS Event 4015 on Windows 2012 R2 Domain Controller
Description:
At DNS Server which also a Domain Controller, you notice the Event Viewer is full with the following error.
The DNS server has encountered a critical error from the Active Directory.
Check that the Active Directory is functioning properly.
The extended error debug information (which may be empty) is 0000051B: AtrErr: DSID-031508EF, #1:0: 0000051B: DSID-031508EF, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 20119 (nTSecurityDescriptor).
Resolution:
Enabled AD diagnostic logging, Enabled Directory access key and set the value to 5.
Look for Event ID 1175 at event viewer and noticed the Object Distinguished Name. You may need to change the ownership of that AD Object to SYSTEM and restarted the DNS service on the domain controller.
ADFS Error - MSIS8022: Unable to find the specified user account.
Description:
You saw several error at ADFS server event viewer. The error was saying "MSIS8022: Unable to find the specified user account."
Resolution:
First, always double check on the user name, make sure they are exist inside Active Directory. After that check for Extranet Lockout feature in ADFS.
When the Extranet Lockout is enabled, ADFS needs to query the badPwdCount attribute of the user, so it tries to look for it in AD before even trying to authenticate. If the user does not exist, you get the error message you see.