项目作者: joeltimothyoh

项目描述 :
A PowerShell module for removing iCloud Photos shortcuts from This PC and Quick access on Windows.
高级语言: PowerShell
项目地址: git://github.com/joeltimothyoh/Remove-iCloudPhotosShortcut.git
创建时间: 2017-09-07T01:34:22Z
项目社区:https://github.com/joeltimothyoh/Remove-iCloudPhotosShortcut

开源协议:Apache License 2.0

下载


Remove-iCloudPhotosShortcut

badge-build-azuredevops-build-img badge-version-github-release-img badge-version-powershellgallery-releases-img

A PowerShell module for removing iCloud Photos shortcuts from This PC and Quick access on Windows.

Introduction

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.

Requirements

*Quick access management is limited to Windows OS versions 10.0.10240 or higher.

Installation

First, ensure PSGallery is registered as a PowerShell repository:

  1. Register-PSRepository -Default -Verbose

To install the module:

  1. # Latest, for the current user
  2. Install-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -Scope CurrentUser -Verbose
  3. # Specific version, for the current user
  4. Install-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -RequiredVersion x.x.x -Scope CurrentUser -Verbose
  5. # Latest, for all users
  6. Install-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -Scope AllUsers -Verbose

Usage

Functions

To remove the iCloud Photos Quick access shortcut:

  1. Remove-iCloudPhotosQuickAccessShortcut -Verbose

To remove the iCloud Photos This PC shortcut (Requires elevation):

  1. Remove-iCloudPhotosThisPCShortcut -Verbose

To list all available functions of the module:

  1. Get-Command -Module Remove-iCloudPhotosShortcut

Administration

Versions

To list versions of the module on PSGallery:

  1. # Latest
  2. Find-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -Verbose
  3. # All versions
  4. Find-Module -Name Remove-iCloudPhotosShortcut -Repository PSGallery -AllVersions -Verbose

To update the module (Existing versions are left intact):

  1. # Latest
  2. Update-Module -Name Remove-iCloudPhotosShortcut -Verbose
  3. # Specific version
  4. Update-Module -Name Remove-iCloudPhotosShortcut -RequiredVersion x.x.x -Verbose

To uninstall the module:

  1. # Latest
  2. Uninstall-Module -Name Remove-iCloudPhotosShortcut -Verbose
  3. # All versions
  4. Uninstall-Module -Name Remove-iCloudPhotosShortcut -AllVersions -Verbose
  5. # To uninstall all other versions other than x.x.x
  6. Get-Module -Name Remove-iCloudPhotosShortcut -ListAvailable | ? { $_.Version -ne 'x.x.x' } | % { Uninstall-Module -Name $_.Name -RequiredVersion $_.Version -Verbose }
  7. # Tip: Simulate uninstalls with -WhatIf

Repositories

To get all registered PowerShell repositories:

  1. Get-PSRepository -Verbose

To set the installation policy for the PSGallery repository:

  1. # PSGallery (trusted)
  2. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted -Verbose
  3. # PSGallery (untrusted)
  4. Set-PSRepository -Name PSGallery -InstallationPolicy Untrusted -Verbose

Development

To import / re-import the module:

  1. # Installed version
  2. Import-Module -Name Remove-iCloudPhotosShortcut -Force -Verbose
  3. # Project version
  4. Import-Module .\src\Remove-iCloudPhotosShortcut\Remove-iCloudPhotosShortcut.psm1 -Force -Verbose

To remove imported functions of the module:

  1. Remove-Module -Name Remove-iCloudPhotosShortcut -Verbose

To list imported versions of the module:

  1. Get-Module -Name Remove-iCloudPhotosShortcut

To list all installed versions of the module available for import:

  1. Get-Module -Name Remove-iCloudPhotosShortcut -ListAvailable -Verbose