A PowerShell module for removing iCloud Photos shortcuts from This PC and Quick access on Windows.
Each time iCloud for Windows is opened, updated, or installed, iCloud Photos shortcuts are automatically created under This PC and/or Quick access in File Explorer, with the former being impossible to remove interactively. This module allows programmatic removal of the shortcuts.
- *Windows with PowerShell.
*Quick access management is limited to Windows OS versions 10.0.10240 or higher.
First, ensure PSGallery is registered as a PowerShell repository:
Register-PSRepository -Default -VerboseTo install the module:
# Latest, for the current user
Install-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -Scope CurrentUser -Verbose
# Specific version, for the current user
Install-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -RequiredVersion x.x.x -Scope CurrentUser -Verbose
# Latest, for all users
Install-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -Scope AllUsers -VerboseTo remove the iCloud Photos Quick access shortcut:
Remove-iCloudPhotosQuickAccessShortcut -VerboseTo remove the iCloud Photos This PC shortcut (Requires elevation):
Remove-iCloudPhotosThisPCShortcut -VerboseTo list all available functions of the module:
Get-Command -Module Remove-iCloudPhotosShortcutTo list versions of the module on PSGallery:
# Latest
Find-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -Verbose
# All versions
Find-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -AllVersions -VerboseTo update the module (Existing versions are left intact):
# Latest
Update-Module -Name Remove-iCloudPhotosShortcut -Verbose
# Specific version
Update-Module -Name Remove-iCloudPhotosShortcut -RequiredVersion x.x.x -VerboseTo uninstall the module:
# Latest
Uninstall-Module -Name Remove-iCloudPhotosShortcut -Verbose
# All versions
Uninstall-Module -Name Remove-iCloudPhotosShortcut -AllVersions -Verbose
# To uninstall all other versions other than x.x.x
Get-Module -Name Remove-iCloudPhotosShortcut -ListAvailable | ? { $_.Version -ne 'x.x.x' } | % { Uninstall-Module -Name $_.Name -RequiredVersion $_.Version -Verbose }
# Tip: Simulate uninstalls with -WhatIfTo get all registered PowerShell repositories:
Get-PSRepository -VerboseTo set the installation policy for the PSGallery repository:
# PSGallery (trusted)
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted -Verbose
# PSGallery (untrusted)
Set-PSRepository -Name PSGallery -InstallationPolicy Untrusted -VerboseTo import / re-import the module:
# Installed version
Import-Module -Name Remove-iCloudPhotosShortcut -Force -Verbose
# Project version
Import-Module .\src\Remove-iCloudPhotosShortcut\Remove-iCloudPhotosShortcut.psm1 -Force -VerboseTo remove imported functions of the module:
Remove-Module -Name Remove-iCloudPhotosShortcut -VerboseTo list imported versions of the module:
Get-Module -Name Remove-iCloudPhotosShortcutTo list all installed versions of the module available for import:
Get-Module -Name Remove-iCloudPhotosShortcut -ListAvailable -Verbose