SOLVED

Removed Hub Site still display as Hub Site

%3CLINGO-SUB%20id%3D%22lingo-sub-177264%22%20slang%3D%22en-US%22%3ERemoved%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-177264%22%20slang%3D%22en-US%22%3E%3CP%3EI%20did%20create%20Hub%20Site%20by%20SharePoint%20Online%20Management%20Shell.%20after%2C%20I%20did%20remove%20that%20Hub%20Site%20permanentaly%20by%20SharePoint%20Online%20Management%20Shell%20(using%20Remove-SPOSite%20and%20Remove-SPODeletedSite).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20Removed%20Site%20is%20still%20display%20as%20Hub%20Site%20on%20%22Hub%20site%20association%22%20dropdown%20list%20and%20Get-SPOHubSite.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHow%20can%20I%20remove%20that%20Hub%20Site%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20tried%20the%20following.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20Unregister-SPOHubSite%3CBR%20%2F%3EReturn%3B%20Unregister-SPOHubSite%20%3A%26nbsp%3BFile%20Not%20Found%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2.%20Tenant.UnregisterHubSite%20method%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.online.sharepoint.tenantadministration.tenant.unregisterhubsite.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.online.sharepoint.tenantadministration.tenant.unregisterhubsite.aspx%3C%2FA%3E%3CBR%20%2F%3EReturn%3B%20Exception%20calling%20%22ExecuteQuery%22%20with%20%220%22%20argument(s)%3A%20%22File%20Not%20Found%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20anyone%20have%20a%20good%20idea%20to%20solve%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-177264%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-326019%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-326019%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20in%20case%20anyone%20runs%20into%20this.......%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EDownload%20and%20Install%20latest%20version%20of%20SharePoint%20OnlineManagement%20shell%20for%20Powershell%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-US%2Fdownload%2Fdetails.aspx%3Fid%3D35588%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Fen-US%2Fdownload%2Fdetails.aspx%3Fid%3D35588%3C%2FA%3E%3C%2FLI%3E%3CLI%3EConnect%20to%20Sharepoint%20Online%20admin%20site%20via%20powershell%3CBR%20%2F%3EConnect-SPOService%20-Url%20%22https%3A%2F%2F%3CTENANT%3E-admin.sharepoint.com%22%3C%2FTENANT%3E%3C%2FLI%3E%3CLI%3EView%20hubsite%20information%3CBR%20%2F%3EGet-SPOHubsite%3C%2FLI%3E%3CLI%3ECopy%20the%20ID%20of%20the%20hubsite%20you%20wish%20to%20delete%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71027iFB16932447C0ACD3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%222019-01-26_1-37-40.png%22%20title%3D%222019-01-26_1-37-40.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3ERun%20the%20unregister%20command%20and%20add%20the%20ID%3CBR%20%2F%3EUnregister-SPOHubSite%204f4cfc32-5331-4af8-8e96-eb820653d8dc%3CBR%20%2F%3E(note%20that%20I%20did%20NOT%20add%20%22-Identity%22%20when%20using%20only%20the%20ID%20of%20the%20hubsite%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-289598%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-289598%22%20slang%3D%22en-US%22%3E%3CP%3EAre%20you%20using%20the%20latest%20version%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-US%2Fdownload%2Fdetails.aspx%3Fid%3D35588%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Fen-US%2Fdownload%2Fdetails.aspx%3Fid%3D35588%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-279276%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-279276%22%20slang%3D%22en-US%22%3E%3CP%3Ehas%20anyone%20been%20able%20to%20fix%20this%20problem%3F%20i%20am%20still%20running%20into%20it.%3C%2FP%3E%3CP%3EThe%20hubsite%20has%20been%20deleted%3A%3CBR%20%2F%3ERemove-SPOHubSiteAssociation%20%3A%20File%20Not%20Found.%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Remove-SPOHubSiteAssociation%20%3CA%20href%3D%22https%3A%2F%2Fahcusadev.sharepoint.com%2Fsites%2FW%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fahcusadev.sharepoint.com%2Fsites%2FW%3C%2FA%3E%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BRemove-SPOHubSiteAssociation%5D%2C%20ServerException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.SharePoint.Client.ServerException%2CMicrosoft.Online.SharePoint.PowerShell.RemoveSPOHubSiteAssociation%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20the%20IDentity%20tag%20i%20get%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EUnregister-SPOHubSite%20%3A%20Cannot%20bind%20parameter%20'Identity'.%20Cannot%20convert%20value%20%22ecbbd04f-3a0a-406b-b8c4-2553ab16b2b5%22%20to%20type%3CBR%20%2F%3E%22Microsoft.Online.SharePoint.PowerShell.SpoHubSitePipeBind%22.%20Error%3A%20%22SpoHubSitePipeBind%20Url%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-268026%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-268026%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Hirofumi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20reason%20this%20happens%20is%20because%20you%20might%20have%20deleted%20the%20site%20without%20removing%20the%20association%20first.%20If%20the%20site%20is%20deleted%20the%20association%20gets%20orphaned%20and%20so%20far%20Microsoft%20has%20no%20SDK%20to%20remove%20orphaned%20sites.%20Although%20they%20are%20working%20on%20it%20and%20I%20see%20updates%20almost%20every%20week%20it%20would%20be%20good%20to%20keep%20an%20eye%20for%20the%20update%20on%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20what%26nbsp%3B%20I%20do%20for%20super%20clean%20SPOSite%20deletions%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24Iterations%20%3D%20%22%22%2C%221%22%3CBR%20%2F%3Eforeach(%24Iteration%20in%20%24Iterations)%20%7B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Write-Host%20%22Iteration%20%3A%20%22%20%24Iteration%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3ERemove-SPOHubSiteAssociation%20%22https%3A%2F%2F%26lt%3B%3CTENANT%3E%26gt%3B.sharepoint.com%2Fsites%2F%26lt%3B%3CSITE%3E%26gt%3B%24Iteration%22%3C%2FSITE%3E%3C%2FTENANT%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3EUnregister-SPOHubSite%20-Identity%20%22https%3A%2F%2F%26lt%3B%3CTENANT%3E%26gt%3B.sharepoint.com%2Fsites%2F%26lt%3B%3CSITE%3E%26gt%3B%24Iteration%22%20-Force%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3ERemove-SPOSite%20-Identity%20%22https%3A%2F%2F%26lt%3B%3CTENANT%3E%26gt%3B.sharepoint.com%2Fsites%2F%26lt%3B%3CSITE%3E%26gt%3B%24Iteration%22%20-Confirm%3A%24false%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3ERemove-SPODeletedSite%20-Identity%20%22https%3A%2F%2F%26lt%3B%3CTENANT%3E%26gt%3B.sharepoint.com%2Fsites%2F%26lt%3B%3CSITE%3E%26gt%3B%24Iteration%22%20-Confirm%3A%24false%3CBR%20%2F%3E%7D%3C%2FSITE%3E%3C%2FTENANT%3E%3C%2FSITE%3E%3C%2FTENANT%3E%3C%2FSITE%3E%3C%2FTENANT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EKaushal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-226029%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-226029%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20you%20get%20SiteId%20by%26nbsp%3B%3CSPAN%3EGet-SPOHubSite%3F%3F%20Get-SPOHubSite%26nbsp%3Bcmdlet%20return%20SiteId%20that%20include%20deleted%20it.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216305%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216305%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3CBR%20%2F%3EI'm%20facing%20the%20same%20problem%20and%20I%20dont%20know%20the%20site%20ID%20or%20the%20URL%20since%20I've%20deleted%20it%26nbsp%3B%3CBR%20%2F%3Eany%20other%20ideas%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-211543%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-211543%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI%20can%20delete%20Hub%20Site%20by%20using%20latest%20SPO%20Management%20Shell%3A%20Unregister-SPOHubSite%20%3CSITEID%3E%3C%2FSITEID%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-206273%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-206273%22%20slang%3D%22en-US%22%3E%3CP%3EI%20too%20am%20having%20this%20problem.%3C%2FP%3E%3CP%3EIS%20there%20anyway%20to%20solve%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-177309%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-177309%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5852%22%20target%3D%22_blank%22%3E%40Melissa%20Torres%3C%2FA%3E%26nbsp%3Bcan%20you%20help%20here%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-856410%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-856410%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F406%22%20target%3D%22_blank%22%3E%40Clint%20Lechner%3C%2FA%3EI%20will%20try%20this%20as%20I%20am%20suffering%20from%20this%20problem%20now.%20Two%20old%20hub%20sites%20are%20showing%20in%20my%20list%20of%20possible%20site%20to%20set%20as%20the%20associated%20hub%20site.%20very%20annoying!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-859383%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-859383%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3003%22%20target%3D%22_blank%22%3E%40Hirofumi%20OTA%3C%2FA%3E%26nbsp%3BAs%20someone%20else%20has%20suggested%2C%20you%20have%20to%20use%20the%20GUID%20of%20the%20site%20that%20was%20deleted.%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20is%20outlined%20in%20the%20documentation.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-online%2Funregister-spohubsite%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-online%2Funregister-spohubsite%3Fview%3Dsharepoint-ps%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-859705%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-859705%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3Bso%20now%20I'm%20just%20a%20%22somebody%22....%20oh%20the%20tears!!!!!!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-859807%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-859807%22%20slang%3D%22en-US%22%3E%3CP%3Eha!%20The%26nbsp%3B%40%20mention%20wasn't%20working!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1086295%22%20slang%3D%22en-US%22%3ERe%3A%20Removed%20Hub%20Site%20still%20display%20as%20Hub%20Site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1086295%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhoa!%20This%20worked%20like%20a%20charm!%20Thanks%20for%20this%20tip!%20At%20first%20I%20was%20a%20little%20concerned%20about%20locating%20the%20GUID%20since%20I%20had%20already%20deleted%20the%20Hub%20site%20in%20the%20admin%20center.%20However%2C%20running%20Get-SPOHubsite%20in%20the%20SPOnline%20mgmt%20shell%20actually%20showed%20met%20he%20GUID%20for%20the%20deleted%20sites%20(which%20I%20think%20is%20kinda%20weird).%20Either%20way%20I%20was%20able%20to%20grab%20the%20id%20and%20they%20were%20gone%20in%20a%20flash.%20I%20had%20been%20living%20with%20these%20annoyances%20for%20over%20a%20year!%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

I did create Hub Site by SharePoint Online Management Shell. after, I did remove that Hub Site permanentaly by SharePoint Online Management Shell (using Remove-SPOSite and Remove-SPODeletedSite).

 

However, Removed Site is still display as Hub Site on "Hub site association" dropdown list and Get-SPOHubSite.

 

How can I remove that Hub Site?

 

I tried the following.

 

1. Unregister-SPOHubSite
Return; Unregister-SPOHubSite : File Not Found

 

2. Tenant.UnregisterHubSite method
https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.tenant.unr...
Return; Exception calling "ExecuteQuery" with "0" argument(s): "File Not Found"

 

Does anyone have a good idea to solve?

14 Replies

@Melissa Torres can you help here?

I too am having this problem.

IS there anyway to solve this?

 

I can delete Hub Site by using latest SPO Management Shell: Unregister-SPOHubSite <SiteId>

Hi,
I'm facing the same problem and I dont know the site ID or the URL since I've deleted it 
any other ideas??

Can you get SiteId by Get-SPOHubSite?? Get-SPOHubSite cmdlet return SiteId that include deleted it.

Hi Hirofumi

 

The reason this happens is because you might have deleted the site without removing the association first. If the site is deleted the association gets orphaned and so far Microsoft has no SDK to remove orphaned sites. Although they are working on it and I see updates almost every week it would be good to keep an eye for the update on this.

 

This is what  I do for super clean SPOSite deletions :

 

$Iterations = "","1"
foreach($Iteration in $Iterations) {
          Write-Host "Iteration : " $Iteration

          Remove-SPOHubSiteAssociation "https://<<tenant>>.sharepoint.com/sites/<<site>>$Iteration"

          Unregister-SPOHubSite -Identity "https://<<tenant>>.sharepoint.com/sites/<<site>>$Iteration" -Force
          Remove-SPOSite -Identity "https://<<tenant>>.sharepoint.com/sites/<<site>>$Iteration" -Confirm:$false
          Remove-SPODeletedSite -Identity "https://<<tenant>>.sharepoint.com/sites/<<site>>$Iteration" -Confirm:$false
}

 

Hope this helps.

 

Cheers

Kaushal

has anyone been able to fix this problem? i am still running into it.

The hubsite has been deleted:
Remove-SPOHubSiteAssociation : File Not Found.
At line:1 char:1
+ Remove-SPOHubSiteAssociation https://ahcusadev.sharepoint.com/sites/W ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Remove-SPOHubSiteAssociation], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.RemoveSPOHubSiteAssociation

 

Using the IDentity tag i get  

Unregister-SPOHubSite : Cannot bind parameter 'Identity'. Cannot convert value "ecbbd04f-3a0a-406b-b8c4-2553ab16b2b5" to type
"Microsoft.Online.SharePoint.PowerShell.SpoHubSitePipeBind". Error: "SpoHubSitePipeBind Url"

Best Response confirmed by Hirofumi OTA (MVP)
Solution

Just in case anyone runs into this.......

 

  1. Download and Install latest version of SharePoint OnlineManagement shell for Powershell
    https://www.microsoft.com/en-US/download/details.aspx?id=35588
  2. Connect to Sharepoint Online admin site via powershell
    Connect-SPOService -Url "https://<tenant>-admin.sharepoint.com"
  3. View hubsite information
    Get-SPOHubsite
  4. Copy the ID of the hubsite you wish to delete
    2019-01-26_1-37-40.png
  5. Run the unregister command and add the ID
    Unregister-SPOHubSite 4f4cfc32-5331-4af8-8e96-eb820653d8dc
    (note that I did NOT add "-Identity" when using only the ID of the hubsite

@Clint LechnerI will try this as I am suffering from this problem now. Two old hub sites are showing in my list of possible site to set as the associated hub site. very annoying!

@Hirofumi OTA As someone else has suggested, you have to use the GUID of the site that was deleted.

This is outlined in the documentation. 

https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/unregister-spohubsite?view=shar...

@Beau Cameron so now I'm just a "somebody".... oh the tears!!!!!!!!

ha! The @ mention wasn't working!!!

@Beau Cameron 

Whoa! This worked like a charm! Thanks for this tip! At first I was a little concerned about locating the GUID since I had already deleted the Hub site in the admin center. However, running Get-SPOHubsite in the SPOnline mgmt shell actually showed met he GUID for the deleted sites (which I think is kinda weird). Either way I was able to grab the id and they were gone in a flash. I had been living with these annoyances for over a year!