blog.icewolf.ch

Let's talk about IT!
posts - 2247, comments - 295, trackbacks - 0

My Links

Archives

Post Categories

icewolf

Saturday, January 14, 2023

Reassign Sway from a permanently deleted User

Hi All,

There is an update of the PowerShell to reassign from deleted Users.

Requirements:
  • You need to be Global Administrator
  • You need the ID of the Sway to Transfer
  • max 30 Days after the user has permanently deleted from Azure Active Directory
Reassign Sways from a deleted user account - Admin Help



PowerShell Cmdlet for Reassigning Sways


After you have downloadet the Zip you need to extract it. It contains four folders with DLL's


Each DLL must be unblocked first


Now you can import those Folders

Import-Module C:\temp\SwayRecovery\SwayRecovery\Microsoft.Identity.Client
Import-Module C:\temp\SwayRecovery\SwayRecovery\Newtonsoft.Json
Import-Module C:\temp\SwayRecovery\SwayRecovery\microsoft.office.story.powershell.protocol
Import-Module C:\temp\SwayRecovery\SwayRecovery\microsoft.office.story.powershell.changeownerclient



List the Commands

Get-Command -Module  microsoft.office.story.powershell.changeownerclient


Login to Sway

Connect-SwayService


I've created a Sway and then deleted that User. See the ID of the Sway


Now i am transfering the Sway to a new owner

Connect-SwayService
Start-ChangeSwayOwner -OriginalSwayLookupId i0q2L2nuAip57pF5 -DestinationOwner "a.bohren@icewolf.ch"
Disconnect-SwayService




The Sway is now visible in my Sways



In my Opinion it's a little bit a fuzzy Process. First of all: Why is that not a regular PowerShell Module and needs extraction and unblocking the DLL's?
Why does it need Global Admin Role? Would not something less also be appropriate?

Regards
Andres Bohren


posted @ Sunday, January 15, 2023 11:03 AM | Filed Under [ Microsoft365 ]

Microsoft.Graph PowerShell Module 1.20.0 released

Hi All,

Just a few Days ago, Microsoft has released Microsoft.Graph PowerShell Module 1.20.0.

Microsoft.Graph 1.20.0


Release Notes

Let's check the installed Version and what's available on the PowerShell Gallery

Get-InstalledModule Microsoft.Graph
Find-Module Microsoft.Graph


To install the newest Version of the PowerShell Modules and also uninstalling the old Versions, you can use my GitHub Script. It takes a while until all Modules are installed. Wait until "Cleanup finished" is shown.

#Run Script directly from GitHub
$ScriptFromGitHub = Invoke-WebRequest "https://raw.githubusercontent.com/BohrenAn/GitHub_PowerShellScripts/main/ExchangeOnline/GraphAPI/Cleanup-GraphModules.ps1"
Invoke-Expression $($ScriptFromGitHub.Content)


To list the Modules you can use the following Command

Get-Module Microsoft.Graph* -ListAvailable



Regards
Andres Bohren


posted @ Saturday, January 14, 2023 3:02 PM | Filed Under [ PowerShell ]

MSIdentityTools PowerShell Module v2.0.33 released

Hi All,

Microsoft has released another Version of theyr MSIdentityTools PowerShell Module to the Powershell Gallery.

MSIdentityTools 2.0.33


Check what Version of the Module is installed and what's available in the PowerShell Gallery

Get-InstalledModule MSIdentityTools
Find-Module MSIdentityTools


Uninstall the old version of the PowerShell Module and install the newest one

Uninstall-Module MSIdentityTools
Install-Module MSIdentityTools
Get-InstalledModule MSIdentityTools


To see what commands are available use the following command

Get-Command -Module MSIdentityTools



Regards
Andres Bohren


posted @ Saturday, January 14, 2023 12:23 PM | Filed Under [ PowerShell ]

Powered by:
Powered By Subtext Powered By ASP.NET