This file contains 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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive\TenantAutoMount] | |
"Company"="Company#xF000;tenantId=xxxxxxxxxx%2xxxxxxxxxx%2xxxxxxxxxx%2Db6cc%2D95f78012db44&siteId=%xxxxxxxxxx%2Df953%2D41d3%2Da85d%2De1e1e2b12e0a%7D&webId=%7B9e138f17%2D50a9%2xxxxxxxxxxD9ccf%2D330e7a888dea%7D&listId=%7B985E592D%2DAD08%2xxxxxxxxxx%2DF8212867DBE5%7D&webUrl=https%3A%2F%2Fsite%2Esharepoint%2Ecom%2Fsites%2FTechnical&version=1" |
This file contains 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
# Install PowerBI PowerShell if needed. | |
Install-Module -Name MicrosoftPowerBIMgmt | |
# Connect to PowerBI Service In PowerShell | |
Connect-PowerBIServiceAccount | |
# Get all Workspaces from the Organization that start with UK. | |
$UKWorkspaces = Get-PowerBIWorkspace -scope Organization -all | Where-Object {$_.name -like 'UK*'} | |
# For Each Workspace workout the Datasets and the Datasources that correspond to them. |
This file contains 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
# Connect to PowerBI Service In PowerShell | |
Connect-PowerBIServiceAccount | |
# Import the Data File for all the PowerBI Datasets you want to change. | |
$src = Import-CSV "c:\temp\DataImport.csv" | |
foreach ($line in $src) { | |
$GetURL = "https://api.powerbi.com/v1.0/myorg/groups/$($line.WorkSpaceID)/datasets/$($line.DatasetID)/datasources" | |
$TakeOwnURL = "https://api.powerbi.com/v1.0/myorg/groups/$($line.WorkSpaceID)/datasets/$($line.DatasetID)/Default.TakeOver" | |
$SubmitURL = "https://api.powerbi.com/v1.0/myorg/groups/$($line.WorkSpaceID)/datasets/$($line.DatasetID)/Default.UpdateDatasources" |
This file contains 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
$dnsname = "Whatever" | |
$dt = $(Get-Date).ToString("M-d-yyyy") | |
$cert = New-SelfSignedCertificate -DnsName $dnsname | |
$certficate = [Convert]::ToBase64String($cert.RawData) | |
$VaultFile = Get-AzRecoveryServicesVaultSettingsFile -SiteRecovery -Vault $vault -Certificate $certficate.ToString() | |
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $VaultFile.FilePath | |
$cert | Remove-Item |
This file contains 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
# Replication Provider Name | |
# Azure to Azure = A2A | |
# VMware to Azure = InMageAzureV2 | |
# List All VMware to Azure Replication Jobs and the Max RPO value in the last 3 days | |
AzureDiagnostics | |
| where replicationProviderName_s == "InMageAzureV2" | |
| where TimeGenerated > ago(72h) | |
| where isnotempty(name_s) and isnotnull(name_s) |
This file contains 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
# Insert AAD Client ID below | |
$clientId = "Insert Azure AD Application Client ID In Here." | |
# Calls the Active Directory Authentication Library (ADAL) to authenticate against AAD | |
function GetAuthToken | |
{ | |
if(-not (Get-Module AzureRm.Profile)) { | |
Import-Module AzureRm.Profile | |
} | |
$redirectUri = "urn:ietf:wg:oauth:2.0:oob" |
This file contains 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
# Login to PowerBI Service | |
Connect-PowerBIServiceAccount | |
# Get all Workspaces from the Organization that start with UK. | |
$UKWorkspaces = Get-PowerBIWorkspace -scope Organization -all | Where-Object {$_.name -like 'uk*'} | |
# For Each Workspace workout the Datasets and the Datasources that correspond to them. | |
foreach ($workspace in $UKWorkspaces) | |
{ | |
$ukdatasets = $workspace | Get-PowerBIDataset -scope Organization |
This file contains 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
# Open Elevated PowerShell. Change into Gateway Directory | |
cd 'C:\Program Files\On-premises data gateway\' | |
# Set Execution Policy | |
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force | |
# Import Gateway PowerShell Module | |
Import-Module .\OnPremisesDataGatewayHAMgmt.psm1 | |
# Login as PowerBI Administrator |
This file contains 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
$tenantAutoMountRegKey="HKLM:\SOFTWARE\Policies\Microsoft\OneDrive\TenantAutoMount" | |
$autoMountTeamSitesList= @{ | |
#Enter your SharePoint libraries to configure here as key/value pairs | |
Technical="INSERT URL IN HERE" | |
} | |
if (-not (Test-Path $tenantAutoMountRegKey)){ | |
New-Item -Path $tenantAutoMountRegKey -Force | |
} |
This file contains 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
$command64 = @' | |
cmd.exe /C "C:\Program Files\Microsoft Office 15\ClientX64\OfficeClickToRun.exe" scenario=Repair platform=x64 culture=en-us RepairType=QuickRepair forceappshutdown=True DisplayLevel=False | |
'@ | |
$command86 = @' | |
cmd.exe /C "C:\Program Files\Microsoft Office 15\ClientX86\OfficeClickToRun.exe" scenario=Repair platform=x86 culture=en-us RepairType=QuickRepair forceappshutdown=True DisplayLevel=False | |
'@ | |
if(Test-Path -Path "C:\Program Files\Microsoft Office 15\ClientX64\OfficeClickToRun.exe"){ | |
Invoke-Expression -Command:$command64 |