Posts

Showing posts from June, 2017

Fatal error when trying to sysprep a machine

Image
Weather you are using SCCM or another imagining method sysprep is almost always used when you capture an image. When you are using a old image you may run into an issue where the system has already reached its maximum amount of syspreps. In most cases I would recommend that you start from scratch and build a brand new image file, However rebuilding isn't always an option but fear not there is a way to reset your sysprep count on the image you are trying to capture. 1. Open regedit and navigate to: HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus Change GeneralizationState to 7 You also want to check that  CleanupState is set to 2 2. In regedit navigate to: HKEY_LOCAL MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatfor Change SkipRearm to 1 3. Navigate to C:\Windows\System32\sysprep now rename the Panther folder to Panther.OLD. you can delete this folder but I would not recommend it. 4. Reboot your system check the registry keys

Script - Unzip cab and zip files

Image
The Dell driver packs located on Dells community site have recently had problems being decompressed I would get errors that would stop the decompression process. I have found that PowerShell can decompress the files correctly. So I created a script to decompress cab and zip files that works very well when you are dealing with large files. Like most of my scripts you can run it right from a PowerShell window and use the File and DecompressTo parameters or you can run the script with out the parameters to display a GUI. <# .SYNOPSIS This script is used to extract a cab or zip file .DESCRIPTION The Script will launch a GUI that will allow you to choose browse for a zip or cab file. Then select a folder to extract to. You can also lauch the script with out a GUI .PARAMETER File Specifyies the zip or cab file .PARAMETER DecompressTo Specifyies the location where the zip or cab should be decompressed to, if you do not specify this paramiter C:\Extracted_Files will

WinPE x64 - Custom Rescue Image

Image
The other day I needed to log into a VM I built ages ago but I forgot the password. I though to my self ok, no problem I will pop in my copy of NT password reset form pogostick.net , only problem was it would never load I have had this problem in the past either I would forget to do a step in the setup process or the system was not configured correctly to boot the OS. Instead of trying to trouble shoot my steps I decided to try to look for a tool that I could include in WinPE. I figured I know WinPE way better and this way I can include other tools like PowerShell. After a little while I finally found a tool called ntpwed it works in the same way as NT Password Reset only problem is it is very difficult to find the download for it the original site  http://cdslow.webhost.ru  where the tool seemed to be from is down. I finally tracked down a copy and made sure it was legitimate and not some virus. .I built the PE image added some other tools I like to use and packed it all up in a ISO t

Query - Client not installed

Query for all Devices that do not have the SCCM client installed. select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Client is null

Script - Create Collection - v 1.0.0.0

A Script that you can use to create a single SCCM Device Collection or create multiple Device Collections based on a file with Collection names in it. The script will also allow you to set the refresh schedule for the collections. <# .SYNOPSIS Creates a SCCM Device Collection .DESCRIPTION Creates a SCCM Device Collection from imput or a list of names in a text file and allows you to set the refresh type .PARAMETER CollectionName Name of the collection you want to create .PARAMETER CollectionsFile Use this parameter to specify a list of collection names to create, must be full file path .PARAMETER LimitingCollection The Collection you want to limmit the collection members from .PARAMETER LoadLocal When used will load the Powershell Module from the local system rather then the server .PARAMETER SiteServer Set the SCCM Site Server .PARAMETER SiteCode Sets the SCCM Site Code .PARAMETER ScheduleType Weeks - Sets the Collection to update every x weeks

Script - Add Collection to Collections - V 1.0.0.0

This is a simple script that will add a Collection to a group of other Collections based on a filter. <# .SYNOPSIS Adds a Colelction to another Collection .DESCRIPTION The Script will add a specified Collection to either a Collection or a group of filtered Collections .PARAMETER Filter Filters the SCCM collections the collection is added to .PARAMETER SiteServer Specifyes the Site Server to connect to .PARAMETER SiteCode Specifies the Site Code of the SCCM enviroment .PARAMETER LoadLocal Tells the script to load the SCCM Module from the local computer or the server .EXAMPLE Add-Collection.ps1 -CollectionToAdd "All Desktops" -Filter "Install - Available*" -LoadLocal -SiteServer "SRV-SCCM" -SiteCode "STI" Adds the All Desktops colelction to the all collectiosn that start with Install - Avaialbe .NOTES Created By: Kris Gross Contact: Krisgross@jackofalltech.org Twitter: @kmgamd Script Version: 1.0.0.0 .LINK htt

Script - Add Computer to SCCM Collection - V 2.1.1.3

Another update to my ACTSC Script. I have added more error checking to the scrip and I have modified the Connect to Site GUI so you can filter your Collection results from there. I have also replaced the Cancel button with a clear button to make it easier to enter more then one device. Original Script and Description can be found HERE <# .SYNOPSIS This script is used to add a computer to a SCCM Collection .DESCRIPTION The Script will launch a GUI that will allow you to choose a collection then type the computer name you want to add to that collection .PARAMETER Filter Filters the SCCM collections that are shown .PARAMETER SiteServer Specifyes the Site Server to connect to .PARAMETER SiteCode Specifies the Site Code of the SCCM enviroment .PARAMETER LoadLocal Tells the script to load the SCCM Module from the local computer or the server .EXAMPLE ACTSC.ps1 -SiteServer ServerName -SiteCode MSN will run the GUI with out prompting for the Site Server and Site