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
| $mailboxes = Get-Mailbox | |
| foreach ($mailbox in $mailboxes) | |
| { | |
| set-mailbox $mailbox.Alias -removedelayholdapplied | |
| set-mailbox $mailbox.Alias -removedelayreleaseholdapplied | |
| } | |
| $mailboxes = Get-Mailbox | |
| foreach ($mailbox in $mailboxes) |
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
| # Connecting to Teams | |
| Connect-MicrosoftTeams | |
| # Connecting to Azure AD | |
| Connect-AzureAD | |
| #Get list of all Teams | |
| $AllTeams = get-team | |
| # For each team extract members |
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
| # First of all we are assuming we have delegated rights through CSP | |
| # If we dont have delegated rights we need a login with reader rights in the customers subscription | |
| # We then need 2 things. The Tenant ID of where the source subscription is located | |
| # Then we need the subscription ID for the source subscription. | |
| # If a customer has multiple subscriptions we will need the IDs for each and the script should be run for each. | |
| # If you need to install Azure Module | |
| Install-Module AzureRM | |
| # Define these 2 variables. |
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
| get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize |
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
| [ | |
| { | |
| "toplevel_name": "Company Bookmarks" | |
| }, | |
| { | |
| "url": "www.Company.co.uk", | |
| "name": "Company Home Page" | |
| }, | |
| { | |
| "url": "https://login.citation.co.uk", |
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
| # Optional, To get your tenant ID via PowerShell | |
| Connect-msolservice | |
| Get-MSOLCompanyInformation | select objectID | |
| # Install SharePoint PowerShell If needed | |
| Install-Module SharePointPnPPowerShellOnline | |
| # Example https://$tenant.sharepoint.com/sites/$siteName | |
| $tenant = 'Enter your Tenant Name in Here' # xxxx.onmicrosoft.com | |
| $tenantId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' #Tenant ID, can be retrieved from Azure AD or PowerShell under optional. |
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
| 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 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
| # 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 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
| # 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 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
| $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 |