Archivo

Archivo del autor

How do you stop a VM that refuses to stop ?

Fuente: http://social.technet.microsoft.com/Forums/windowsserver/en-US/1270772c-7bcb-46b6-9427-8350249e0893/how-do-you-stop-a-vm-that-refuses-to-stop

 

Answer:

If you grab Sysinternals Process Monitor you can check each VMWP.EXE Process (Virtual Machine Worker Process) and Select ‘Properties’ and each process will have a reference in the ‘Command Line’ section of the properties dialogue which refers to the VM’s GUID which can be found for each VM by examining the configuration files contained in C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines and then just kill the approriate VMWP.EXE Instance and that should kill that VM without affecting any of your other currently running VM’s.

Categorías: virtualización Etiquetas:

Error 1079: La cuenta especificada para este servicio es diferente de…

Fuente: http://answers.microsoft.com/es-es/windows/forum/windows_7-hardware/c%C3%B3mo-puedo-iniciar-el-controlador-de-audio-de/4b1289ac-6694-420b-a063-47c7c5860415

 

Problema:

Cada vez que lo intento me pone: Error 1079: La cuenta especificada para este servicio es diferente de la cuenta especificada para otros servicios que se están ejecutando en el mismo proceso.

También he probado reiniciar windows para que se recuperara de los errores pero no funciona.
Los controladores funcionan correctamente.
Resolución:

Cuando el sistema arroja el error “Error 1079: La cuenta especificada para este servicio es diferente de la cuenta especificada para otros servicios que se están ejecutando en el mismo proceso”  es porque el servicio esta iniciado en la cuenta Sistema local (Local System) en vez de ser iniciado por la cuenta Servicio Local (Local Service) (NT AUTHORITY\LocalService) La cuenta local puede carecer de servicios insuficientes para iniciar el servicio.

 

 

Para resolver el problema ejecuta el Fix It que encuentras en este enlace, descarga el archivo, ejecútalo, sigue los pasos del asistente y una vez éste termine de ejecutarse verifica que el problema se haya corregido.

 

 

Si el problema persiste debes configurar el servicio y cualquier servicio dependiente para que se ejecute bajo la cuenta NT AUTHORITY\LocalService. Para ello sigue estos pasos:

 

 

1.     Haz clic en Inicio y digita services.msc, luego presiona enter.

2.     Localiza el servicio Firewall de Windows y haz doble clic sobre el servicio.

3.     Haz clic en la pestaña Iniciar sesión.

4.     Haz clic para marcar la casilla Esta cuenta y en el cuadro de texto digita NT AUTHORITY\LocalService.

5.     Deja los campos de contraseña en blanco.

6.     Haz clic en Aplicar y luego en Aceptar.

7.     Repite los mismos pasos para el servicio Motor de filtrado.

8.     Reinicia ambos servicios haciendo clic derecho sobre cada uno y luego haciendo clic en Reiniciar.

 

 

Categorías: windows Etiquetas: ,

How do I programatically change the create, modify, access date on a file ?

Fuente: http://stackoverflow.com/questions/582553/how-do-i-programatically-change-the-create-modify-access-date-on-a-file/582638#582638

I need to change the modify date on a file in windows so that it doesn’t clutter up my sort order. How can I do that with a script (I may need to do that to the file in the future as well)?

thanks.

BTW: I don’t want to have to install apps to do this.

ANSWER:

If you have powershell

$(Get-Item ).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
$(Get-Item ).lastaccesstime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
$(Get-Item ).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
share|improve this answer

Categorías: windows Etiquetas: , ,

Error Domain Join over VPN

Fuente:  http://social.technet.microsoft.com/Forums/windowsserver/en-US/a0a38e4c-744e-4617-8918-78589ff2d7e5/domain-join-over-vpn

 

I’m having difficulty joining a Windows 2008 R2 server located in a remote site to a domain via a VPN connection.  The remote server has its sole DNS entry pointed to the SBS 2008 machine on the other end of the VPN.

I can ping the SBS server by IP address and FQDN.  Addresses such as http://companyweb, however, do not resolve.

When attempting to join the remote server through “System Properties”, “Computer Name/Domain Changes” dialog box with a domain entry that omits the «.local» I receive an error message “An Active Directory Domain Controller (AD DC) for the domain “xyz” could not be contacted.”

However, when using domain «xyz.local», I am prompted for admin credentials and after several minutes I receive the error message “The following error occurred attempting to join the domain “xyz.local”: The specified network name is no longer available.”

SOLUTION:

This was resolved by changing the Primary DNS Suffix of the remote computer to «xyz.local» and then re-running the domain join.

Ethernet Properties – General – Advanced button – DNS tab (add the domain at «DNS suffix for this connection»)  and checks «Register this conn…» and «Use this connection0s DNS…»

Also add de IP of DNS server of the domain controller

Ejecutar batch inicio sesión en Windows 8

Fuente: http://blogs.itpro.es/calonso/2013/04/28/ejecutar-batch-inicio-sesion-en-windows-8/

En ocasiones necesitamos que se ejecute un batch cuando iniciamos sesión en nuestro Windows, por ejemplo para mapear una unidad de red, ejecutar un determinado comando, etc.

La forma más sencilla de realizar esta acción es crear el batch, por ejemplo, en una carpeta de Documentos/scripts:

28041141

Existe una carpeta llamada Inicio donde podemos ubicar aquello que queremos que se ejecute cuando nuestro usuario inicie sesión. Para localizarla, la forma más sencilla es desde el explorador de archivos, tecleear inicio en la barra de direcciones.

28041142

Una vez localizado el destino, seleccionamos el archivo correspondiente al batch y lo podemos copiar a esta ruta o directamente hacer un acceso directo.

28041143

Copiamos este acceso directo a la ruta Inicio y cerramos la sesión. Al volver a iniciar sesión e ir al escritorio, se ejecutará.

28041144

28041146

Si no queremos que nos salga el aviso, desmarcaremos la opción Preguntar siempre antes de abrir este archivo.

Categorías: windows Etiquetas:

How To Create A Self-Signed Computer Certificate using PowerShell Step-By-Step; Much Easier Than MakeCert.exe

Fuente: http://itproguru.com/expert/2013/10/how-to-create-a-self-signed-computer-certificate-using-powershell-step-by-step-much-easier-than-makecert-exe/

 

I need to create a self-signed computer certificate to use for authentication between my Windows Server 2012 Server and Windows Azure.  The same process will work for other versions of windows and for communication with other applications.  In my case, I am using it for Windows Azure Backup but the steps would be the same for other certificates where you want to have a computer authenticate via a self-signed certificate.  With the script the process is super simple and it was written in such a way that you don’t need to make any changes to the script.  In order to achieve this, I need to create the certificate, install it on the local computer and export it to a file so I can then upload it to Windows Azure.  All of this can be done by simply copying and pasting the code into a PowerShell Window or PowerShell ISE window if you want to change the parameters by simply changing two variable and running it!  The two variables are

1)  Where do you want to store the exported file. ($certfilepath = “c:\”

2) What you want to call the certificate  ($certfilename = “GuruCert_”)

Experience Microsoft’s latest products with these FREE downloads!

PowerShell Source Follows:  Downloadable .TXT version of script can be found at: http://ITProGuru.com/downloads/SelfSignedCertificate.txt

# SelfSignedCertificate.ps1 
# Written By Dan Stolts http://ITProGuru.com/downloads/SelfSignedCertificate.txt 
# Purpose Create, Install and Export a self-signed certificate 
#   In my case, I am using this for my Windows Server 2012 server to Authenticate with Windows Azure Backup
# Source download Location... http://ITProGuru.com/downloads/SelfSignedCertificate.txt 
#
$certfilepath = "c:\"     #Where do you want to export the file to?  Include trailing backslash
$certfilename = "GuruCert_"  #what name would you like for the cert (used for Certificate Name and Exported Filename) [no extension]
$certfilename += hostname    # Append the host name to the cert name

$name = new-object -com "X509Enrollment.CX500DistinguishedName.1"
$name.Encode("CN=" + $certfilename , 0)

$key = new-object -com "X509Enrollment.CX509PrivateKey.1"
$key.ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
$key.KeySpec = 1
$key.Length = 2048
$key.SecurityDescriptor = "D:PAI(A;;0xd01f01ff;;;SY)(A;;0xd01f01ff;;;BA)(A;;0x80120089;;;NS)"
$key.MachineContext = 1
$key.Create()

$serverauthoid = new-object -com "X509Enrollment.CObjectId.1"
$serverauthoid.InitializeFromValue("1.3.6.1.5.5.7.3.2")
$ekuoids = new-object -com "X509Enrollment.CObjectIds.1"
$ekuoids.add($serverauthoid)
$ekuext = new-object -com "X509Enrollment.CX509ExtensionEnhancedKeyUsage.1"
$ekuext.InitializeEncode($ekuoids)

$cert = new-object -com "X509Enrollment.CX509CertificateRequestCertificate.1"
$cert.InitializeFromPrivateKey(2, $key, "")
$cert.Subject = $name
$cert.Issuer = $cert.Subject
$cert.NotBefore = get-date
$cert.NotAfter = $cert.NotBefore.AddDays(900)
$cert.X509Extensions.Add($ekuext)
$cert.Encode()

$enrollment = new-object -com "X509Enrollment.CX509Enrollment.1"
$enrollment.InitializeFromRequest($cert)
$certdata = $enrollment.CreateRequest(0)
$enrollment.InstallResponse(2, $certdata, 0, "")

# Let user know the certificate is now installed
Write "The following <$certfilename> certs are now installed..."
dir -recurse cert:\localmachine\My | Where-Object { $_.Subject -eq ("CN=" + $certfilename)} | Format-Table subject, thumbprint, notbefore -AutoSize

# Get the thumbprint from the last created certificate of the name we just created - so we can export it to a file
$thumbprint=(dir cert:\localmachine\My -recurse | where {$_.Subject -match "CN=" + $certfilename} | Select-Object -Last 1).thumbprint
Write  "Exporting cert:\LocalMachine\My\$thumbprint to $certfilepath$certfilename.cer ... "
dir cert:\localmachine\My -recurse | where {$_.thumbprint -match $thumbprint} # Display the certificate we will be exporting

# Do the export
$filelocation = $certfilepath ; $filelocation += $certfilename; $filelocation +=(".cer") # Concatinate the destination filename and path

Export-certificate -FilePath $filelocation -Cert cert:\localmachine\My\$thumbprint
Write "The certificate that was just installed/exported is: cert:\LocalMachine\My\$thumbprint $filelocation"

#
# Special Thanks to: 
#     Vishal Agarwal for his work at http://blogs.technet.com/b/vishalagarwal/archive/2009/08/22/generating-a-certificate-self-signed-using-powershell-and-certenroll-interfaces.aspx 
#     Steve Wiseman for his work at http://www.networksteve.com/?p=7839 
#  Their work was leveraged for this script
# Thanks for using scripts created by ITProGuru.com

OK… So it does not look that simple right… Well that is because it is doing plenty. However, all you have to do is paste into a PowerShell command window and watch the magic. If you do want to tweak it; like changing the name of the cert or the output location…  You can ignore all the lines that start with a pound (#)  they are just comments.  Then it is the first two or three lines of the script that you have to change to put in your own values.

Step-By-Step

1) Run PowerShell from the machine you want to create certificate on: To run any application with elevated privileges (as Administrator) simply right-click on that program from the menu and select Run as Administrator.  Step-By-Step: Start then type PowerShell then Right-Click on PowerShell icon and select Run as Administrator.  This is also known as Administrative Permissions.

2) Highlight the text between the lines above; right-click select copy

3) Right-click the PowerShell window to paste and watch the magic…

4) Navigate to c:\ to see your new certificate which will be called “GuruCert_YourMachineName

If you found this helpful, please Tweet:

Thanks @ITProGuru for #PowerShell How To Create A Self-Signed Computer Certificate using PowerShell Step-By-Step  http://aka.ms/GuruCert

– See more at: http://itproguru.com/expert/2013/10/how-to-create-a-self-signed-computer-certificate-using-powershell-step-by-step-much-easier-than-makecert-exe/#sthash.UIrHSFoO.dpuf

Categorías: windows Etiquetas:

System.IO.FileNotFoundException running Windows Azure PowerShell command

Fuente: http://blogs.msdn.com/b/cie/archive/2014/02/27/system-io-filenotfoundexception-running-windows-azure-powershell-command.aspx

 

I ran into this error using a fresh install of Windows Azure PowerShell (Version:0.7.3, February 2014). There were a few other
people running into this as well, so blogging it here.

Set-AzureStorageBlobContent : Could not load file or assembly ‘Microsoft.WindowsAzure.Storage.DataMovement,
Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies.
The system cannot find the file specified.
+     Set-AzureStorageBlobContent -File $filename -Container $containerName – …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Set-AzureStorageBlobContent], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.WindowsAzure.Commands.Storage.Blob.
SetAzureBlobContentCommand

The snapshot below shows the installed version from “Control Panel\Programs\Programs and Features”

clip_image002

The only place I could find the Microsoft.WindowsAzure.Storage.DataMovement.dll on the machine was the AzCopy folder and even there the version did not match.

clip_image004

Fusion log shows the failure as well.

Looks like C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Commands.Storage.dll has a reference to this Microsoft.WindowsAzure.Storage.DataMovement.dll but the dll is missing.

// Microsoft.WindowsAzure.Storage.DataMovement, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

clip_image006

Solution
======
Turns out this was a transient install failure, we were able to resolve this using the steps below.

1) Uninstall the “Windows Azure PowerShell – February 2014” from “Control Panel\Programs\Programs and Features”.
clip_image002[5]

2) Delete the following WebPI cache:
C:\Users\<userAccount>\AppData\Local\Microsoft\Web Platform Installer

3) Reinstall “Windows Azure PowerShell” .
Open WebPlatfom Installer(on a windows8 machine, you can use Start–> type “web platform Installer”) and launch the installer.
Select “Windows Azure PowerShell” and install it.

clip_image004[6]

Check the folder “C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure” to make sure that the dll “Microsoft.WindowsAzure.Storage.DataMovement.dll” is present.

Categorías: cloud computing Etiquetas: ,