Click on Pictures to View

To view a larger version of an image within a post, just click on the picture you want to view :)

Wednesday, July 27, 2016

Sysprep Windows 10

So I was needing to prepare a VMware Fusion virtual machine for embedding in our NetRestore image we deploy to all of our new MacBooks.  We recently decided to upgrade / deploy all Virtual Machines on Macs with Windows 10 rather than Windows 7.

At first I ran into a few problems, which ended up being rather silly things that I simply overlooked.
Anyway, here's the process I used to successfully SysPrep a Windows 10 virtual machine for distribution.

1.  I first imaged a virtual machine with a fresh copy of our corporate Windows 10 base load image.  I actually did this using an ISO created with SCCM to essentially PXE boot the vm and pull the image down over the network from our SCCM server / distribution point (DP)

2.  Our corporate base load has a known local administrator account already configured with a known password.  If you are unsure of the password of an account already created or if there is not a local admin account, etc, just create a new local user account with a password set to never expire.  Don't forget to remove that newly created user account from the "User" group membership, and instead add it to the "Administrators" group, or else you won't have local admin rights.

3.  Next, our newly imaged virtual machine was automatically joined to the domain during the imaging process.  So the next step was to remove the machine from the domain (this is also why a local administrator account with a known password is needed - so you can log on to the machine after removing it from the domain).  So in the computer's properties, move the computer off the domain and into a workgroup.  Then save and or apply, and OK and it will prompt for a reboot.  Say yes to reboot.

4.  After the vm rebooted, I logged in with our local admin account with known password.  After logging in, I also disabled our anti-virus to head off any issues or potential errors from being thrown during or after the next step (it re-enables and updates itself anyway once booting up the sysprepped machine)

5.  Then I launched an elevated command prompt (right click "cmd" & run as administrator).  Changed directory to Sysprep directory:  cd C:\Windows\System32\Sysprep
Then typed "sysprep" (without quotes) and pressed enter.  This brought up a little GUI dialog box.

6.  The settings to use are "Enter System Out-Of-Box Experience (OOBE)" with the "Generalize" box checked, and Shutdown Option of "Shutdown".  This will sysprep this very machine and shut it down, so you can then copy it for distribution.  When you launch this shut down machine or any of its copies, it is a brand new "box" with unique SSID and computer name, etc.  During the initial boot up, it asks if you want to join to a domain or not, followed by creating a new local user account for the new machine you are booting up.  This must be a different account than the one used to do the sysprep process.


Here are a few notes:

- Make sure you are not joined to any domain prior to running Sysprep tool - it will throw an error either during the sysprep process, or after opening the sysprepped OS (see below error)

- If the local administrator account is disabled by default, before removing from the domain, right click the admin account in Computer Management Users & Groups and uncheck "Account is disabled"
- If you launch the same file you just sysprepped without making a copy, you will no longer have your original shutdown file and will probably have to start over either from the very beginning or relaunch the sysprep GUI and run sysprep again to create a usable file to copy for distribution
- If you imaged a vm and are getting ready to run sysprep on it but are unsure about anything, make a copy BEFORE running sysprep.  This way you have an already imaged backup machine and don't have to reimage another one should something fail or go awry.


Sources:

https://redmondmag.com/articles/2016/03/04/sysprep-work-with-windows-10-2.aspx

https://superwidgets.wordpress.com/tag/windows-10-sysprep/

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/windows-could-not-complete-the-installation-to/bf09c3c5-298b-459f-aed5-4f431b8398f5?auth=1

Thursday, July 14, 2016

Command for Timestamped Ping

Thought I'd post this since it has come in handy several times.  Just save the command to a text file for later, and cut and paste the command to a cmd prompt when needed and voila.  No 3rd party software needed, etc.

This command will give you a timestamped continuous ping:

ping -t 8.8.8.8|cmd /q /v /c "(pause&pause)>nul & for /l %a in () do (set /p "data=" && echo(!date! !time! !data!)&ping -n 2 8.8.8.8>nul"

You can replace the two 8.8.8.8 addresses with whatever IP address you are trying to ping




Press Ctrl + C to end the ping

You can also send the output directly to a text file.
This command sends output of ping to 8.8.8.8 to C:\pingtest.txt


ping -t 8.8.8.8|cmd /q /v /c "(pause&pause)>nul & for /l %a in () do (set /p "data=" && echo(!date! !time! !data!)&ping -n 2 8.8.8.8>nul" >C:\pingtest.txt

You can replace the two 8.8.8.8 addresses with whatever IP address you are trying to ping, and C:\pingtest.txt with whatever location and file name you want to send the output to.

Don't forget to press Ctrl + C in the command window to end the ping




Sources:

https://www.raymond.cc/blog/timestamp-ping-with-hrping/

Thursday, July 7, 2016

SCCM 2012 Installation Status Waiting for Content

We had a machine that showed as "Waiting for Content" for a certain application in the Deployments section of Monitoring in SCCM administration console.

All other machines in the company successfully received the application with successful installation.  So this was a one-off.

Troubleshooting Process:

1) Verified SCCM client was installed correctly and completely.  This meant 7 tabs across two rows in the client window, 11 client actions listed on the Actions Tab, correct assigned site code, and an "installation succeeded" entry in the C:\Windows\ccmsetup\Logs\ccmsetup.log file.

2) Verified software was seen in Software Center with status as Downloading (0% complete)

3)  AppDiscovery.log and AppEnforce.log in C:\Windows\CCM\Logs didn't show anything in particular in regards to the application in question

4)  Verified content was available in the SCCM software repository location and was available on the Distribution Point where the computer was located


Resolution:

In the process of seeing what remote site the computer was at to verify the Distribution Point location, I looked at the IP address of the machine.  It showed to have an IP address in the new IP address scheme we are starting to slowly roll out to all of our sites.

I then remembered that as we roll out the new IP address scheme, whenever the new data subnet deployed to a site was not added to Active Directory Sites and Services, SCCM content could not be downloaded by client computers.

Sure enough, the new subnet that the computer was in was missing from Active Directory Sites and Services.  We added the subnet in, waited a few hours for everything to update, and then checked that the computer began downloading and installing the software.