As of this writing, Microsoft has disabled the basic authentication to Exchange Online, the alternate more secure method to authenticate and access Exchange Online is via Client Credential flow using OAuth token. OAuth (OIDC) Client Credential flow is typically used for background (eg. windows services or daemon) process without interaction with user.
Microsoft provides different APIs to access Exchange Online. To authenticate against these APIs, we need OAuth access token with appropriate permissions when invoking these APIs. And this type of access token is obtained from Azure AD.
Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts
GitHub Create Private Fork of a Public Repository
When making a fork of a GitHub public repository, the fork repository is set up with public visibility. However, under certain circumstances, it may be desirable to make the fork repository with private or internal (in an organization) visibility.
Here is one way to indirectly 'forking' a repository with with private or internal visibility.
Here is one way to indirectly 'forking' a repository with with private or internal visibility.
Create Sharepoint Site with Azure Function using PowerShell
Business Case
Create SharePoint site based on user requirement without SharePoint Admin manually performing the task.
Design
A SharePoint List is created and shared with designated users to enter the desired SharePoint site criteria. Using an Azure function with PnP PowerShell module (compatible with PowerShell core in Azure function) to periodically check if any new entry in the SharePoint List and create SharePoint site based on the user entered criteria.
Powershell Password Encryption & Decryption
One of the common task in PowerShell script design and execution is credential encryption requirement. Some privileged account is used and its credential need to pass to the script in order to access resources. It becomes crucial especially when the execution tasks are being delegated to other users or being automated. As storing the password as clear text is huge security risk and the last thing desired, here in this blog post we discuss a few options on storing the credential securely.
Execute SSIS remotely - PowerShell
Since SQL Server 2012, Microsoft introduce a new way of interacting and storing SSIS package. SSIS packages are frequently executed in scheduling format often through SQL Server agent jobs. Today blog post will be focusing on remotely calling SSIS package stored in this new SSISDB Catalog.
Use PowerShell To Test Port
There are times when we need to identify or troubleshoot if firewall exception is configured correctly and the desired remote server port is open. Often time, I have seen IT Professional use Telnet or PuTTY to test. However, there is another way to do it with PowerShell.
PowerShell Cim Cmdlet to PowerShell 2.0 or older
Starting in PowerShell 3.0, Microsoft introduces a new set of cmdlets to manage servers or devices that complies to DMTF standards. These new set of cmdlets, CIM (Common Information Model (CIM) Cmdlets allow IT professional to better manage their data center especially when it consists of servers from different vendors.
Enable PowerShell Double-Hop Remoting
When working with PowerShell, there are cases when there is a need to remote into a computer with PowerShell session and perform tasks against another computer. These are some of the typical double hop scenario common in PowerShell.
PowerShell Session - Execute PowerShell Commands on Remote Computer
SQL Server Agent Job and Powershell Version
Since SQL Server 2008, we are able to create SQL Agent job step to run Windows PowerShell scripts. That is great! However, as the latest version 3.0 release of Windows PowerShell, be aware that SQL Server Agent may not be running the same PowerShell version. Before you deploy any PowerShell script to SQL Agent job, you need to make sure you test the PowerShell scripts in the right version.
PowerShell Get-Help and Update-Help
As a lot of system, database and network administrators are transitioning from VBScript to PowerShell or learning PowerShell to automate administration tasks for the first time, it is common to run into a new or unfamiliar PowerShell cmdlets that may be useful in your tasks. Get-Help cmdlets could be one of the most effective learning assistant.
PowerShell and Performance Monitor (Perfmon) Counter
I previously blogged about how to evaluate SQL server performance by using performance monitor (Perfmon) or logman to capture performance counters. Recently I discover that PowerShell could be utilize to capture the performance counters as well as a better tool to automate process. This post consist of the PowerShell Script I developed and how the perfmon data are imported into the database.
Subscribe to:
Posts (Atom)





