meta data de esta página
  •  

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
windows:powershell:pswindowsupdate [2022/08/17 12:56] lcwindows:powershell:pswindowsupdate [2023/05/11 09:33] (actual) – [Referencias] lc
Línea 14: Línea 14:
 $proxy = '172.19.254.2:8080' $proxy = '172.19.254.2:8080'
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy($proxy)[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true+[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy($proxy) 
 +[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true
 </sxh> </sxh>
  
Línea 70: Línea 71:
  
 Para cambiar la política  Para cambiar la política 
-<sxh ps>Set-ExecutionPolicy -ExecutionPolicy <políticanueva></sx>+<sxh ps>Set-ExecutionPolicy -ExecutionPolicy <políticanueva></sxh> 
 Por ejemplo Por ejemplo
 <sxh ps>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned</sxh> <sxh ps>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned</sxh>
 +
 == Comandos del módulo == == Comandos del módulo ==
 +  * Para saber todos los comandos del módulo ejecutar -> **Get-Command –Module PSWindowsUpdate**
   * Ver las opciones configuradas->**Get-WUSettings**   * Ver las opciones configuradas->**Get-WUSettings**
   * Ver las actualizaciones pendientes→ **Get-WindowsUpdate o Get-WUList**   * Ver las actualizaciones pendientes→ **Get-WindowsUpdate o Get-WUList**
   * Ver la última vez que actualizó` (New-Object -com "Microsoft.Update.AutoUpdate").Results|fl`   * Ver la última vez que actualizó` (New-Object -com "Microsoft.Update.AutoUpdate").Results|fl`
   * Instalar las actualizaciones → **Install-WindowsUpdate**   * Instalar las actualizaciones → **Install-WindowsUpdate**
-  * Instalar y reinciar **Install-WindowsUpdate -AcceptAll -AutoReboot`**+  * Instalar y reinciar **Install-WindowsUpdate -AcceptAll -AutoReboot**
   * Instalar un KB específico → **Get-WindowsUpdate -Install -KBArticleID 'KB4560960'**   * Instalar un KB específico → **Get-WindowsUpdate -Install -KBArticleID 'KB4560960'**
  
Línea 114: Línea 118:
   * https://spaghettidba.com/2017/12/19/recovering-the-psgallery-repository-behind-a-corporate-proxy/   * https://spaghettidba.com/2017/12/19/recovering-the-psgallery-repository-behind-a-corporate-proxy/
   * https://docs.microsoft.com/es-es/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2   * https://docs.microsoft.com/es-es/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2
 +  * https://spaghettidba.com/2017/12/19/recovering-the-psgallery-repository-behind-a-corporate-proxy/