This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Pre-requisites | |
https://learn.microsoft.com/en-us/power-platform/admin/powerapps-powershell | |
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell | |
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber | |
Azure App Registration API Permissions | |
Most of these may need to be added by searching under "APIs my organization uses" and adding them to the app registration | |
For the Power Platform API, if not present, follow the steps here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# App Registration requires the following Graph permissions (User Delegated) | |
# User.Read, Group.Read.All, Tasks.Read.All, Tasks.Read.Shared | |
$cloud = "" # Valid types, null for Worldwide, GCC, GCCH, DOD | |
$_clientId = '' # Application (Client) Id from the Azure App registration | |
$_tentantId = '' # Directory ID from the Azure App Registration | |
$_authHeader = $null | |
$_groupName = "Team4" # Group name of the tasks you want to list | |
switch ($cloud) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tenantId = '<Your Azure Tenant Id>' | |
$appObjectId = "<Your Application Object Id>" # Object ID and not the Application ID | |
$path = "$env:USERPROFILE\Desktop\Uris.txt" | |
### You shouldn't have to modify below this line ### | |
Connect-AzureAD -TenantId $tenantId | |
# ObjectId for application from App Registrations in your AzureAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tenantId = '<Your Azure Tenant Id>' | |
$appObjectId = "<Your Application Object Id>" # Object ID and not the Application ID | |
$newURLs = 'https://mynewurl','https://mynewurl2' # reply URLs to add | |
### You shouldn't have to modify below this line ### | |
Connect-AzureAD -TenantId $tenantId | |
$app = Get-AzureADApplication -ObjectId $appObjectId | |
# Existing reply URLs list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-Location "C:\users\MyUser\Desktop\" | |
$obj = Import-Csv -Path USCities.csv | |
$sourceSiteUrl = "http://portal.adatum.local/sites/siteCollectionA" | |
Connect-PnPOnline $sourceSiteUrl -CurrentCredentials | |
foreach ($row in $obj){ | |
Write-Output "Adding City $($row.city)" | |
Add-PnPListItem -List "USCities" -Values @{"Title" = $($row.id); | |
"City" = $($row.city); | |
"StateId"=$($row.state_id); | |
"Zip" = $($row.zips); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script> | |
<script language="javascript" type="text/javascript"> | |
$(document).ready(function () { | |
var positionOfColumn = -1; | |
// loop through the headers and fetch the index of the column | |
$('.ms-listviewtable th').each(function(index, element ) { | |
if($(this).html().indexOf('StateId') != -1){ | |
//console.log("Found StateId: " + index); | |
positionOfColumn = index; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Microsoft provides programming examples for illustration only, without warranty either expressed or | |
implied, including, but not limited to, the implied warranties of merchantability and/or fitness | |
for a particular purpose. | |
This sample assumes that you are familiar with the programming language being demonstrated and the | |
tools used to create and debug procedures. Microsoft support professionals can help explain the | |
functionality of a particular procedure, but they will not modify these examples to provide added | |
functionality or construct procedures to meet your specific needs. if you have limited programming |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s; | |
if (typeof $.ui === 'undefined') { | |
// jquery ui not loaded | |
s = document.createElement('script'); | |
s.src = "https://code.jquery.com/ui/1.12.1/jquery-ui.js"; | |
document.head.appendChild(s); | |
console.log("jQuery UI is undefined. Added reference") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$userAccountName="joeb" | |
$getADUser = (([adsisearcher]"(&(objectCategory=User)(samaccountname=$($userAccountName)))").FindAll()).properties | |
$getADUser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$groupName="workflowGroup" | |
$getADGroup = (([adsisearcher]"(&(objectCategory=Group)(name=$($groupName)))").FindAll()).properties | |
$getADGroup |
NewerOlder