Referencia de comandos del módulo

Aquí, puedes encontrar una referencia para todos los comandos del módulo. Esta referencia está diseñada para ayudarte a encontrar rápidamente el comando que necesitas y entender cómo usarlo de manera efectiva.

Al hacer clic en un comando, serás llevado a una página detallada que proporciona información completa sobre el comando, incluyendo su sintaxis, parámetros, ejemplos y cualquier nota o consejo adicional para su uso.

1 - Export-PackageUpdateInfo

SINOPSIS

Exporta PackageUpdateInfo a un archivo de datos

SINTAXIS

__AllParameterSets

Export-PackageUpdateInfo [[-Path] <string>] -InputObject <Info[]> [-OutputFormat <string>]
 [-Encoding <string>] [-Force] [-Append] [-IncludeTimeStamp] [-PassThru] [-WhatIf] [-Confirm]
 [<CommonParameters>]

ALIAS

Este cmdlet tiene los siguientes alias,

DESCRIPCIÓN

Exporta PackageUpdateInfo a un archivo de datos

EJEMPLOS

EJEMPLO 1

PS C:\> Get-PackageUpdateInfo | Export-PackageUpdateInfo

Ejemplo de uso de Export-PackageUpdateInfo

PARÁMETROS

-Append

El archivo de salida no será reemplazado.
Toda la información se añadirá al final.

Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Si este interruptor está habilitado, se te pedirá confirmación antes de ejecutar cualquier operación que cambie el estado.

Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Encoding

Codificación del archivo

Type: String
DefaultValue: default
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Force

Si el directorio para el archivo no está presente, pero se especifica un directorio distinto del predeterminado,
la función intentará crear el directorio.

Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-IncludeTimeStamp

Se añadirá una marca de tiempo a los registros de información.

Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-InputObject

El PackageUpdateInfo de la función Get-PackageUpdateInfo.

Type: Info[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OutputFormat

El formato de salida para los datos
Los formatos disponibles son “XML”, “JSON”, “CSV”

Type: String
DefaultValue: XML
SupportsWildcards: false
Aliases:
- Format
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PassThru

Los objetos exportados se analizarán en la canalización para su procesamiento posterior.

Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Path

La ruta del archivo donde exportar la información.
Por favor, especifica un archivo como ruta.

Type: String
DefaultValue: (Join-Path $HOME "AppData\Local\Microsoft\Windows\PowerShell\PackageUpdateInfo.xml")
SupportsWildcards: false
Aliases:
- FullName
- FilePath
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Si este interruptor está habilitado, no se realizarán acciones, pero se mostrarán mensajes informativos que expliquen qué pasaría si el comando se ejecutara.

Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Parámetros comunes

Este cmdlet soporta los parámetros comunes: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction y -WarningVariable. Para más información, consulta
about_CommonParameters.

ENTRADAS

PackageUpdate.Info[]

SALIDAS

PackageUpdate.Info

2 - Import-PackageUpdateInfo

SINOPSIS

Importa PackageUpdateInfo desde un archivo de datos

SINTAXIS

__AllParameterSets

Import-PackageUpdateInfo [[-Path] <string>] [-ShowToastNotification] [-InputFormat <string>]
 [-Encoding <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

ALIAS

Este cmdlet tiene los siguientes alias,

DESCRIPCIÓN

Importa PackageUpdateInfo desde un archivo de datos exportado previamente con la función Export-PackageUpdateInfo.

EJEMPLOS

EJEMPLO 1

PS C:\> Import-PackageUpdateInfo

Intenta importar el archivo predeterminado “$HOME\AppData\Local\Microsoft\Windows\PowerShell\PackageUpdateInfo.xml”

PARÁMETROS

-Confirm

Si habilitas este interruptor, se te solicitará confirmación antes de ejecutar cualquier operación que cambie el estado.

Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Encoding

Codificación del archivo

Type: String
DefaultValue: default
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-InputFormat

El formato de salida para los datos Los formatos disponibles son “XML”, “JSON”, “CSV”

Type: String
DefaultValue: XML
SupportsWildcards: false
Aliases:
- Format
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Path

La ruta del archivo donde importar la información. Por favor, especifica un archivo como ruta.

Type: String
DefaultValue: (Join-Path $HOME "AppData\Local\Microsoft\Windows\PowerShell\PackageUpdateInfo.xml")
SupportsWildcards: false
Aliases:
- FullName
- FilePath
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ShowToastNotification

Este interruptor invoca notificaciones de Windows-Toast agradables con información de notas de lanzamiento en módulos que necesitan actualización.

Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- ToastNotification
- Notify
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Si habilitas este interruptor, no se realizarán acciones, pero se mostrarán mensajes informativos que explican qué sucedería si el comando se ejecutara.

Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Parámetros comunes

Este cmdlet soporta los parámetros comunes: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, y -WarningVariable. Para más información, consulta about_CommonParameters.

ENTRADAS

System.String

SALIDAS

PackageUpdate.Info

3 - Obtener-InformaciónDeActualizaciónDePaquete

SINOPSIS

Obtén información sobre la actualidad de los módulos instalados.

SINTAXIS

DefaultSet1 (Predeterminado)

Obtener-InformaciónDeActualizaciónDePaquete [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
 [-ShowToastNotification] [<CommonParameters>]

CurrentUser

Obtener-InformaciónDeActualizaciónDePaquete [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
 [-ShowToastNotification] [-CurrentUser] [<CommonParameters>]

AllUsers

Obtener-InformaciónDeActualizaciónDePaquete [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
 [-ShowToastNotification] [-AllUsers] [<CommonParameters>]

ALIAS

Este cmdlet tiene los siguientes alias,

DESCRIPCIÓN

Obtener-InformaciónDeActualizaciónDePaquete consulta los módulos instalados localmente y los compara con las versiones en línea para verificar su actualidad.

EJEMPLOS

EJEMPLO 1

PS C:\> Obtener-InformaciónDeActualizaciónDePaquete

Genera una salida con información de actualización para todos los módulos (currentUser y AllUsers).
La salida puede verse así:

Nombre Repositorio VersiónInstalada VersiónEnLínea NecesitaActualización Ruta


PSReadline PSGallery 1.2 1.2 Falso C:\Program Files\WindowsPowerShell\Modules\PSReadline Pester PSGallery 4.4.0 4.4.2 Verdadero C:\Program Files\WindowsPowerShell\Modules\Pester

EJEMPLO 2

PS C:\> Obtener-InformaciónDeActualizaciónDePaquete -ShowOnlyNeededUpdate

Esto filtrará la salida para mostrar solo los módulos donde NecesitaActualización es Verdadero.
La salida puede verse así:

Nombre Repositorio VersiónInstalada VersiónEnLínea NecesitaActualización Ruta


Pester PSGallery 4.4.0 4.4.2 Verdadero C:\Program Files\WindowsPowerShell\Modules\Pester

EJEMPLO 3

PS C:\> "Pester", "PSReadline" | Obtener-InformaciónDeActualizaciónDePaquete

Se soporta la canalización. Esto devuelve la información solo para los dos módulos “Pester” y “PSReadline”.

También se puede hacer con el cmdlet Get-Module:
Get-Module “Pester”, “PSReadline” | Obtener-InformaciónDeActualizaciónDePaquete

PARÁMETROS

-AllUsers

Busca solo en los directorios AllUsers/sistema.
Ten en cuenta que se requieren derechos de administrador para actualizar esos módulos.

Type: SwitchParameter
DefaultValue: Falso
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: AllUsers
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-CurrentUser

Busca solo en el perfil del usuario actual.
Esto es útil si estás ejecutando sin derechos de administrador, lo cual siempre deberías hacer como tu preferencia predeterminada de trabajo.

Type: SwitchParameter
DefaultValue: Falso
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: CurrentUser
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

El nombre del módulo a verificar.

Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (Todos)
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Repository

El repositorio a verificar.

Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (Todos)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ShowOnlyNeededUpdate

Este interruptor suprime los módulos actualizados de la salida.

Type: SwitchParameter
DefaultValue: Falso
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (Todos)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ShowToastNotification

Este interruptor invoca notificaciones de Windows Toast con información de notas de lanzamiento para los módulos que necesitan actualización.

Type: SwitchParameter
DefaultValue: Falso
SupportsWildcards: false
Aliases:
- ToastNotification
- Notify
ParameterSets:
- Name: (Todos)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Parámetros comunes

Este cmdlet soporta los parámetros comunes: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction y -WarningVariable. Para más información, consulta
about_CommonParameters.

ENTRADAS

System.String[]

SALIDAS

PackageUpdate.Info