How to execute this powershell script? (Defederating GoDaddy o365)

Hey all, trying to get the hell away from GoDaddy and using the defederating guide here: https://tminus365.com/defederating-godaddy-365/ It provides a script here:
Write-Host "Checking for MSGraph module..."

$Module = Get-Module -Name "Microsoft.Graph.Identity.DirectoryManagement" -ListAvailable

if ($Module -eq $null) {

Write-Host "MSGraph module not found, installing MSGraph"
Install-Module -name Microsoft.Graph.Identity.DirectoryManagement

}
Connect-MgGraph -Scopes "Directory.Read.All","Domain.Read.All","Domain.ReadWrite.All","Directory.AccessAsUser.All"
#Enter the Admin credentials from "Become a tenant Admin in GoDaddy"

Get-MgDomain
#See that the domain is “federated”#

Update-MgDomain -DomainId "<InsertFederatedDomain>" -Authentication Managed
Write-Host "Checking for MSGraph module..."

$Module = Get-Module -Name "Microsoft.Graph.Identity.DirectoryManagement" -ListAvailable

if ($Module -eq $null) {

Write-Host "MSGraph module not found, installing MSGraph"
Install-Module -name Microsoft.Graph.Identity.DirectoryManagement

}
Connect-MgGraph -Scopes "Directory.Read.All","Domain.Read.All","Domain.ReadWrite.All","Directory.AccessAsUser.All"
#Enter the Admin credentials from "Become a tenant Admin in GoDaddy"

Get-MgDomain
#See that the domain is “federated”#

Update-MgDomain -DomainId "<InsertFederatedDomain>" -Authentication Managed
But I'm just unsure how to implement this? Like obviously I replace <InsertFederatedDomain> with my domain, but in what format do I enter my credentials above? Is this script supposed to be run at once? Because it looks like it should be run in split into at least 4 stages (Write-Host,Connect-MgGraph,Get-MgDomain and Update-MgDomain) Anyone got any tips? Even if you've just got a slightly better grasp than me it would be appreciated! 🙂 Larse.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server