jueves, 8 de febrero de 2018

Windows 10 – AppX Packages Can Break Sysprep

Hi.

I was suffering a problem using MDT trying to capture with sysprep the Windows 10 x86 1709 release. The log shows the error 0x3cf2 after launching sysprep /generalize.

Problem and solution appears here:  KB2769827  but this guy https://virtuallyinclined.com/2017/01/08/windows-10-appx-packages-can-break-sysprep/ and myself went from throwing lines after launching sysprep /generalize again and again.

 I'd appreciate your feedback and update if you would detect that I had to remove more apps after changing them in Windows 10, because I've seen that these are changing depending on the apps promoted by Microsoft in every period.

The second problem I've found is that the shawn's script is not updated for W10 v1709 so I updated this.

Finally the scripts are:

FIRST ONE:

Import-Module AppX
Import-Module Dism

#You may have to manually uninstall some Sponsored Apps from the Start Menu

#Microsoft Apps
Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.BingTranslator* | Remove-AppxPackage
Get-AppxPackage *Microsoft.FreshPaint* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Microsoft.NetworkSpeedTest* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.OneConnect* | Remove-AppxPackage
Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsCalculator* | Remove-AppxPackage
Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsMaps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxIdentityProvider* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage
Get-AppxPackage *SpotifyAB.SpotifyMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.bingnews* | Remove-AppxPackage
Get-AppxPackage *king.com.BubbleWitch3Saga* | Remove-AppxPackage
Get-AppxPackage *king.com.CandyCrushSodaSaga* | Remove-AppxPackage
Get-AppxPackage *A278AB0D.MarchofEmpires* | Remove-AppxPackage
Get-AppxPackage *A278AB0D.DisneyMagicKingdoms* | Remove-AppxPackage
Get-AppxPackage *DolbyLaboratories.DolbyAccess* | Remove-AppxPackage

#Sponsored Apps
Get-AppxPackage *Duolingo* | Remove-AppxPackage
Get-AppxPackage *EclipseManager* | Remove-AppxPackage
Get-AppxPackage *Flipboard* | Remove-AppxPackage
Get-AppxPackage *Wunderlist* | Remove-AppxPackage


AND THE SECOND ONE:

Import-Module AppX
Import-Module Dism

#You may have to manually uninstall some Sponsored Apps from the Start Menu

#Remove AppX Packages for non-business Apps
Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxIdentityProvider* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage

#Remove AppX Provisioning for non-business apps
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.3DBuilder" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Getstarted" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Messaging" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftOfficeHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Office.OneNote" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.People" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.SkypeApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "microsoft.windowscommunicationsapps" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsFeedbackHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxIdentityProvider" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneMusic" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneVideo" | Remove-AppxProvisionedPackage -Online

martes, 26 de diciembre de 2017

Console shows this error "requesturi is /veeamservice" when you try to connect to a veeam server

Hello.

After my investigation I didn't find in internet the solution to the problem named in the title of this article.

I found from veeam some information like this article: https://www.veeam.com/kb1756

As you are able to find in internet, this problem appears if the service is down but as I said it didn't work in my case because the services were working properly so i had to investigate more.

Finally the problem was related with the network. I had three nics in my server and Veeam worked fine when I re installed the server only with one Nic enabled and all others disabled. Maybe there is another article detailing the problem but while that, I wanted to share with you the solution I deduced after reading all others.

Cheers.




martes, 28 de marzo de 2017

Powershell script - Cambio de contraseña de administrador local 2/2

Siguiendo con la entrada anterior, publico a continuación el script que deberá ser lanzado vía sccm u otros, de forma local en los equipos por mediante un usuario que tenga permiso de acceso a los archivos que hemos generado con nuestro script que comento también en la entrada anterior.

Como comenté, el script modifica la contraseña del usuario con ID 0, el cual, ya que si fuésemos a buscar el usuario Administrador o Administrator, este podría haber sido nombrado y fallaríamos en nuestro intento.

Personalización:

El script requiere ser personalizado en la linea 1 y 2, donde pondremos la ruta correcta de los archivos.

Script:

$PasswordFile = "c:\temp\Password.txt"
$KeyFile = "c:\temp\AES.key"
$key = Get-Content $KeyFile
$pwd= get-content $passwordfile | Convertto-SecureString -Key $Key
$userlist = get-wmiobject win32_useraccount
$localadm=$userlist[0].caption.replace(“\”,”/”)
$objUser = [ADSI]"WinNT://$localadm, user"
$decodedpassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pwd))
$objUser.psbase.Invoke("SetPassword", $decodedpassword)
$objuser.psbase.CommitChanges()

Script Powershell para el cambio de contraseña local de usuario administrador 1/2

Hola.

Es común encontrar una gpo a través de la cual cambiamos la contraseña del usuario administrador local en los equipos de nuestro dominio, sin embargo, este proceso no es nada seguro y cualquier auditor de seguridad va directamente a por él, colocándonos un colorcito rojo en las cosas que tenemos que cambiar antes de la siguiente auditoría.

Pues bien, para ello he realizado dos scripts, este primero que os presento cifrará la contraseña que queremos poner y la guardará en un archivo txt de forma cifrada.

También tendremos un archivo que guardará la clave de cifrado que hemos usado para cifrar. Yo, lo que haría, sería ubicar ambos archivos en un carpeta de red compartida de forma oculta a la que sol tuviese acceso el usuario que vía sccm u otros, va a lanzar el proceso de cambio. Usuario que por supuesto, ha de pertencer al grupo builtin\administrators del dominio o ser administrador local de los equipos del parque por otras vías.

Cabe destacar que este script ha de ser lanzado por el personal de IT cada vez que queremos generar un archivo txt con una clave diferente, o mejor dicho, cada vez que queremos cambiar la clave de administrador de los equipos.

Personalización del script:

- Debéis modificar la linea 2 y linea 8 cambiando las rutas donde almacenar los archivos.

Contenido del script:

#generamos archivo .key
$KeyFile = "C:\Temp\AES.key"
$Key = New-Object Byte[] 16   # podemos usar 16, 24, or 32 for AES
[Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key)
$Key | out-file $KeyFile

#generamos archivo .txt y guardamos contraseña en él.
$PasswordFile = "c:\temp\Password.txt"
$Key = Get-Content $KeyFile
$Password = "Abcd123456" | ConvertTo-SecureString -AsPlainText -Force
$Password | ConvertFrom-SecureString -key $Key | Out-File $PasswordFile

lunes, 20 de febrero de 2017

Virtual shared disk en disco local


Hola.

Existe la posibilidad de montar un disco compartido entre varias VMS, ubicando ese disco en una unidad local del servidor.

Esta configuración no está soportada por Microsoft y al configurarla, por defecto aparece un error impidiendo esta configuración.

La formad de realizarlo es lanzando previamente este comando:

fltmc.exe attach svhdxflt Unidad:\


Este comando pierde su efectividad si se renombra el servidor, teniendo que volver a lanzarlo para poder arrancar las VMS.

Saludos.