Posts

Showing posts from November, 2020

Disconnect Objects with AAD Connect by PowerShell

 This a quick memo on how to disconnect objects from AADConnect with PowerShell.  There is a blog to describe the process.  But as the  csdelete.exe has been replaced by the PowerShell command  Remove-ADSyncCSObject. So I just record the process to use the PowerShell to do this. $userCN  =  "CN=Test User,DC=Maincotech,DC=com"   #Specify the user's distinguishedName $connectorName  =  "Maincotech.com"   #Specify the connector name for On-primse AD $csObj  =  Get-ADSyncCSObject  -DistinguishedName  $userCN  -ConnectorName  $connectorName Remove-ADSyncCSObject  -CsObject  $csObj  -Force Run delta sync with the PowerShell command below. Start-ADSyncSyncCycle  -PolicyType Delta That's all.

Use LESS in Blazor Application

Image
I've been doing some styling work for Blazor projects recently so I thought it might be useful to write a post about it. We're going to have a look at how we can get it integrated into the Blazor application. Let’s first include the package.json file to hold the npm packages. To do this, right-click project > Add New Item.. Search npm and select npm Configuration File and click Add . This will add a package.json file in the solution. Now, we will install gulp and related packages from the command prompt. Go to command prompt (RUN > cmd) and navigate to the project folder then type the commands below and press enter. npm install --save-dev gulp gulp-autoprefixer gulp-clean gulp-clean-css gulp-concat gulp-less After the command executes successfully, the package.config will be something like below. Next, let’s add gulpfile.js into our solution. To do this, right-click the project in Solution Explorer and click “Add New Item..” In the new items dialogue, search Javascript a...

Use Power Automate to archive the SendGrid activity events

Image
 As you may know, the SendGrid will only save 30-days activity events. Sometimes we need to store the logs for a more long time for troubleshooting purposes or auditing purposes. In this blog, I will share a step by step method to archive the SendGrid activity logs to Azure Log Analytics. Prerequisites To use Log Analytics, you need to be signed in to an Azure account. If you don't have an Azure account,  create one for free . SendGrid Account. If you don't have a SendGrid account, create one for free . Licensed Flow Account. If you don't have one, start a trial . Create the Flow 1. Sign in to  Power Automate . 2. Create an Instant flow from blank. 3.Give the Flow a name, such as Archive Sendgrid Activities. 4. Select the "When an HTTP request is received" as the Trigger and Click Create. 5. Leave the Request Body JSON Schema empty.  6. Select the method as POST and specify the relativePath as "Accounts{AccountName}". 7.Click New Step, input "Azur...