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 esta opción está habilitada, 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: ''
-Force
Si el directorio para el archivo no está presente, pero se especifica un directorio diferente al 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: ''
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: ''
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 enviarán al pipeline 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 esta opción está habilitada, 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 - Get-PackageUpdateInfo
SINOPSIS
Obtén información sobre la actualización de los módulos instalados
SINTAXIS
DefaultSet1 (Predeterminado)
Get-PackageUpdateInfo [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
[-ShowToastNotification] [<CommonParameters>]
CurrentUser
Get-PackageUpdateInfo [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
[-ShowToastNotification] [-CurrentUser] [<CommonParameters>]
AllUsers
Get-PackageUpdateInfo [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
[-ShowToastNotification] [-AllUsers] [<CommonParameters>]
ALIAS
Este cmdlet tiene los siguientes alias,
DESCRIPCIÓN
Get-PackageUpdateInfo consulta los módulos instalados localmente y los compara con las versiones en línea para verificar si están actualizados
EJEMPLOS
EJEMPLO 1
PS C:\> Get-PackageUpdateInfo
Muestra 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 NecesitaActualizar 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:\> Get-PackageUpdateInfo -ShowOnlyNeededUpdate
Esto filtrará la salida para mostrar solo los módulos donde NeedUpdate es Verdadero.
La salida puede verse así:
Nombre Repositorio VersiónInstalada VersiónEnLínea NecesitaActualizar Ruta
Pester PSGallery 4.4.0 4.4.2 Verdadero C:\Program Files\WindowsPowerShell\Modules\Pester
EJEMPLO 3
PS C:\> "Pester", "PSReadline" | Get-PackageUpdateInfo
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” | Get-PackageUpdateInfo
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: False
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 deberías hacer siempre como tu preferencia predeterminada de trabajo.
Type: SwitchParameter
DefaultValue: False
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: (All)
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: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ShowOnlyNeededUpdate
Este interruptor suprime los módulos actualizados del resultado.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
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 sobre 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: ''
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 - 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: ''
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 sobre 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é pasaría si se ejecutara el comando.
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