Giter Site home page Giter Site logo

psd's People

Contributors

arwidmark avatar deploymentbunny avatar geosimos avatar hammarskjold avatar jordantheitguy avatar mtniehaus avatar nocheroot avatar powershellcrack avatar soupman98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psd's Issues

MDT Monitoring Service failed to install

On a PSD instance created with the Hydration Kit, the MDT Monitoring Service failed to install. The checkbox under Deployment Share properties was selected. This caused the TS to fail.

Unchecking and rechecking the box created and started the service.

image

Create a Markdown File That Explains How To Install PDT Updates

At MMS 2023, Johan gave a quick demo of upgrading a PDT installation to a new release - super helpful!

From memory, the steps were:

  • Download the new version of PDT (optionally, I suppose people could git pull the latest update?)
  • Run Install-PSD.ps1 with the -Upgrade flag, pointing it to your existing installation path and share (the -Verbose flag shows everything that's being done to perform the upgrade)
  • Existing scripts are backed up as part of the process

These steps should ideally be put into a .md file with screenshots to make this process more accessible to folks.

Non-localized User and Group Names

It should be mentioned to use an English based 'OsLanguage' OS, because the security groups are not localized in the install script.

For PowerShell Cmdlets the groups can be translated and icacls.exe can work with SID's directly.

Will I run into more problems when continuing with a non English OS, after fixing the group names ?

Wipe all Disks in Pre-PSD wipes USB-Sticks

I love the new Pre-PSD menu (and the release in general). But I noticed that wiping all disks also wipes the USB stick (from which I booted).
PSDResources\Prestart\PSDPrestartMenu.ps1
        '2' { Clear-Host Write-Host "Cleaning all disks" #Get-Disk | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false -Verbose             #Get-PhysicalDisk | Reset-PhysicalDisk -Verbose # Using diskpart due to issues with Clear-Disk # Borrowed (with pride) code snippet from David Segura $Disks = Get-Disk foreach ($Disk in $Disks){ $null = @" select disk $($Disk.number) clean exit "@ | diskpart.exe }
Changing line 75 to
$Disks = Get-Disk | Where-Object "bustype" -ne "usb"
should prevent that.

Branch to PSD-Remaster

I've updated the Install-PSD.ps1 to do what the Install-PSD script does, what the New-PSDWebInstance is trying to do, and a whole lot more, like 'creating a URI folder, SMB share, PSDrive, and PSDrive description. It also goes on to install the scripts that Michael started writing over 2 years ago that someone slapped code over that just 'checks' to see if minimum versions of ADK, WinPE and MDT are installed, my version will check the version numbers and if they're not installed, it will source those installations from Microsoft's website and install them automatically and then proceed with the rest of the installation.

That's called 'doing things the right way'.

My installation script also installs the web server features that you've listed in your WebInstance in addition to several others that I intend to use once my project stretches it's legs.

Are there problems? Sure.

Is there a lot more cohesiveness to my script? Yup.

https://github.com/mcc85s/PSD-Remaster

I don't mean to sound like I know everything... because I don't. There's still a lot of room left for my project to expand, but you know what?

I went ahead and made the process a lot more convenient.

Because that's what experts are supposed to do.

Sysprep just a moment after Task Sequence

After installing Windows 10 21H2 via the PSDClient task sequence i give the machine a sysprep.exe /oobe /quiet /reboot. (with an whiteout /mode:vm)
The virtual machine keeps hanging on just a moment no matter how long i wait.

Tried to remove the unattend xml in the pather folder (same result)

Tried the UnattendforAutopilotSysprep.xml of the website from Johan (same result)

Wim file i use is untouched and downloaded from my visualstudio portal (business edition)

ADK and ADKPE Detection are working in en-Us OSCulture but not In other OsCulture

There is an error In ADK and ADKPE detection

#TODO - Check for ADK installed and version
$mdtADK = (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "Windows Assessment and Deployment Kit*"}).DisplayVersion
Write-Verbose "ADK installed version== $mdtADK"
$mdtADKPE = (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "Windows Assessment and Deployment Kit Windows*"}).DisplayVersion
Write-Verbose "WinPE Addon for ADK(only for ADK1809 or above)== $mdtADKPE"

Here two functions works in FR-FR and en-US OsCulture

ADK_ADKPE_detection.zip

Adding debug parameter breaks deployment

The current documentation says in order to enable debug mode one has to add the parameter to the PSDStart.ps1 execution command in PSD:\Templates\LiteTouchPE.xml. However, there is no such command in that file. So I added the parameter to the command in PSD:\Templates\Unattend_PE_x64.xml and PSD:\Templates\Unattend_PE_x86.xml.

But changing
<Path>powershell.exe -noprofile -windowstyle hidden -file X:\Deploy\Scripts\PSDStart.ps1</Path>
to
<Path>powershell.exe -noprofile -windowstyle hidden -file X:\Deploy\Scripts\PSDStart.ps1 -Debug</Path>
causes the deployment to stop and the monitor output remains the following indefinitely:

image

Minor issue running powershell scripts

The PowerShell step in the task sequence (which utilises PSDPowershell.ps1) opens a blank powershell window instead of executing the script. This happens only if a full path is specified instead of a simple file name.
The format %SCRIPTROOT%\Upload-PSDLogs.ps1 won't work (but Upload-PSDLogs.ps1 should work).
This is a minor issue (it works if I provide the file name instead of the full path). However, most if not all examples on using scripts in MDT will use %SCRIPTROOT\ in front of the script name. It also can be confusing because executing scripts using cmd will require the full path.

<![LOG[PSDPowerShell.ps1: Starting: PSDPowerShell.ps1 - Version 0.0.1]LOG]!><time="19:23:30.96960" date="12-21-2022" component="PSDPowerShell.ps1:46" context="CND-DPL-XN0CPE\Administrator" type="1" thread="7408" file="PSDPowerShell.ps1">
<![LOG[PSDPowerShell.ps1: The task sequencer log is located at C:\MININT\SMSTSLog\SMSTS.LOG. For task sequence failures, please consult this log.]LOG]!><time="19:23:30.96960" date="12-21-2022" component="PSDPowerShell.ps1:47" context="CND-DPL-XN0CPE\Administrator" type="1" thread="7408" file="PSDPowerShell.ps1">
<![LOG[PSDPowerShell.ps1: tsenv:ScriptName C:\MININT\Cache\Scripts\Upload-PSDLogs.ps1]LOG]!><time="19:23:31.21960" date="12-21-2022" component="PSDPowerShell.ps1:50" context="CND-DPL-XN0CPE\Administrator" type="1" thread="7408" file="PSDPowerShell.ps1">
<![LOG[PSDPowerShell.ps1: tsenv:Parameters ]LOG]!><time="19:23:31.21960" date="12-21-2022" component="PSDPowerShell.ps1:51" context="CND-DPL-XN0CPE\Administrator" type="1" thread="7408" file="PSDPowerShell.ps1">
<![LOG[PSDPowerShell.ps1: About to run: ]LOG]!><time="19:23:31.68860" date="12-21-2022" component="PSDPowerShell.ps1:55" context="CND-DPL-XN0CPE\Administrator" type="1" thread="7408" file="PSDPowerShell.ps1">
<![LOG[PSDPowerShell.ps1: ArgumentList:  ]LOG]!><time="19:23:31.68860" date="12-21-2022" component="PSDPowerShell.ps1:56" context="CND-DPL-XN0CPE\Administrator" type="1" thread="7408" file="PSDPowerShell.ps1">

The about About to run: line expands an empty variable.
I did a minor change to PSDPowershell.ps1 to line 53:

$ScriptToRun = Find-PSDFile -FileName $($tsenv:ScriptName)

Adding another split-path -Leaf -Path ...

$ScriptFileName = Split-Path -Leaf -Path $($tsenv:ScriptName)
$ScriptToRun = Find-PSDFile -FileName $ScriptFileName

This way it doesn't matter in which format the path is provided and Find-PSDFile can provide the path.

TS Variables Don't Work In CustomSettings.ini

If I try to set OSDComputerName as ABC-%SerialNumber%, it does not get replaced with the serial number of the device. It tries to use ABC-%SerialNumber%, which of course is more than 15 characters.

PSD Wizard does not automatically start, have to manually start PSDstart.ps1 & task sequence does not complete...

When running the MDT .ISO on a machine the PSD selection wizard does not come up automatically. If I hit F8 and browse to X:\Deploy\Scripts and run PSDStart.ps1 the menu loads. When I select a task sequence and run it, it formats the disk, downloads and installs the image and it stops at the gather step (Installation Progress disappears) after applying the image and does not restart nor does it continue. Is something missing in the latest version? Please help!

2020-10-21_14-01-55

2

PSDGather.psm1

I look in the file and find only one reference to $bOnBattery and its set to false.
When do you change this verb to true?

BranchCache guidance/advice

Looking for some general advice/guidance/tips on implementing branchcache with psd. I have the 2pint OSD toolkit addon working great but I seem to only pull about 60mb for a 1gb driver package in wim format and about 600mb for a 4.5gb os image (standalone wim). I have a windows server setup on my local network and I've tried:

  • Export-BCCachePackage after staging the branchcache on the main PSD server and then importing the package on my local network's server.
  • cloning the PSD deployment share with syncthing to my local network's server and then using Publish-BCWebContent -Path "C:\PSD" -Recurse to publish the bc content
  • Increased both publication cache and local cache to about 50% of the local network server's disk space (its a server just for branchcache testing)
  • ensured that all default firewall rules are enabled for branchcache on my local network's server
  • disabled bits limits for local network peers on local network server

I might be over estimating how much branchcache can be utilized here but I was expecting more than 600mb to be used for a 4.5gb os wim especially when the entire file is available on my local server. I've read through serveral 2pint KB articles on branchcache usage and several of Johan's blog articles on the subject to see if Im missing something but so far I can find anything.

Any advice or tips here are appreciated, I'm a bit of a noob to branchcache as you may be able to tell.

New-PSDDriverPackage creating large ZIP Files

For specific behavior example, Dell Latitude 7420. The driver pack CAB is 1.84GB, the extracted folder size is 3.42GB.

However, the file generated by New-PSDDriverPackage is 5.21GB and its source folder is over 9GB.

I think I've narrowed down the issue to..

Within New-PSDDriverPackage it takes the Driver name from MDT and iterates through each of them. These drivers however can live in the same source folder, but have different classes. The script itself looks at driver classes and creates a folder based off of the class. It then copies the entire source folder to that folder. This leads to redundant files in different folders. If it's a small driver, it's fine. But in the case of video drivers, this leads to multiple GB's difference between the uncompressed source, and the zip file.

Back to the example of the 7420, the video drivers are in Display, Extension, MEDIA and SoftwareComponent.

How to do an in-place OS upgrade?

Looking at the PSD templates, I don't see a template which does an OS Upgrade. In the standard MDT templates, there was the ClientUpgrade.xml which utilized the UpgradeOS function in LTIApply.wsf. How is this functionality accomplished in PSD(PSDApplyOS.ps1)?

Additionally, in my testing the PSDDeploymentShare.Get-PSDContent function has a return value of a string. However, when control returns back to PSDStart.ps1, the return value is an array which is then attempted to be used as a string. This is throwing errors.

Slow PowerShell startup in WinPE

PowerShell takes about 7-8 seconds to start for each script, which very much slows down the process. This is tracked down to being the reason of lack of native (compiled) .Net images. By running ngen against well known assemblies we should be able to greatly speed things up.

This should be kicked off in parallel to any other activity as soon as possible in the WinPE startup.

This could also affect brand new image deployments where the .NET optimizers have not been run (after .Net upgrade or raw images).

Server Core walkthrough

I tested everything with SAC, 2019 Server core, Hyper-V, Proxmox and had no problem,
compared to vanilla MDT, the experience wasn't good to be honest, but to finally ditch PXE and offer a HTTP boot over the edge, I might use it anyway.

I struggled for a second to realize, I had to set DeployRoot=http:// to the new web based deploymentshare in bootstrap.ini,
maybe I missed it in the documents.

First, I had to customize the Scripts\PSDStart.ps1, to not check for mspaint.exe on the filesystem providers, as this file is not present on server core. This resulted in a missing "script/PSDStart.ps1" in the MININT folder.

# TODO: Need to find a better file for detection of running OS If (Test-Path -Path "$($Drive.Name):\Windows\System32\notepad.exe"){ Start-PSDLogging -Logpath "$($Drive.Name):\MININT\SMSOSD\OSDLOGS"

I also tuned the shutdown command to 5 sec. (I don't like the back and forth between, CMD commands and PowerShell!!) and
deleted the creation of the recovery partition for EFI and Bios, as ProxMox is not fond of EFI at all (changed with 7.1).

I had to take my time to learn, that the TS entry's for partitioning, are now useless and I had to change the
Partition-layout in Script/PSDPartition.ps1 (Maybe delete it from PSD*.xml ?)

After I created a new TS, based on the the PSDServer.xml and a server core OS, the newly created unattend.xml, was still referring to the C:\LTIBootstrap.vbs if I choose a server core OS, standard GUI server
or Clients OS were already changed to the new PSDStart.ps1 scripts.

After changing it to the new default, the psdstart.ps1 was still not started after WIM install phase,

<FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>powershell.exe -noprofile -windowstyle minimized -executionpolicy bypass -file %SystemDrive%\MININT\Scripts\PSDStart.ps1 -start</CommandLine> <Description>Lite Touch new OS</Description> <Order>1</Order> </SynchronousCommand> </FirstLogonCommands>

I also had to delete the "-start part" of the command.

If I kept the restarts to a minimum (1 :D) everything was working fine, if I used more reboots, the TS was not continuing after the second reboot,
I worked around it with an old school runonce regkey step to start the PSDStart.ps1 again.

I noticed if I set "SkipSummary" and/or "SkipFinalSummary" in Customsettings.ini to yes, the final reboot/Shutdown will not happen at the end of a TS, but I will have to test this again.

Thanks for the MDT additions and I hope the project will get some final adjustments.

Reverse Proxy Support

I have tried to use nginx to reverse proxy this, but have ran into issues passing the credentials over due to how ntlm auth works, I have tried with disabling auth and allowing anonymous on IIS and both basic and digest auth on the nginx reverse proxy.

After filling out the credentials it just gets stuck on Verifying connection to https://site.website.tld/deploy

As for the reason for the reverse proxy:
my home isp changes ip pretty rapidly and the reverse proxy is hosted on a vps with a vpn tunnel back to my home lab.

Update Deployment Share Slow

I got my PS Deployment share set up and then added the OS, drivers and a few applications. I then try to update the deployment share and it never seems to complete. I started the update a couple days ago around 5pm and then checked it the next morning and it was still updating. Any idea what may cause this? Too many drivers or something possibly? I downloaded the Dell Deploy Driver pack for the model laptop we're imaging, but it does seem like there's quite a few drivers that get's included for some reason. In the past when I've setup MDT I feel like I've had 12-15 drivers total but this driver pack probably has 45 or so.

Any thoughts are appreciated. Thanks!

Select Applications Wizard not functioning

Hi PSD Team!,

I have a minor issue I have run into hoping for some guidance. I cannot get the application selection to work correctly in the task sequence.

When selecting the applications in the Wizard and starting the task sequence the install Applications script meant to install the applications via the deployment wizard does nothing during the task sequence.

I can create task sequences and add the applications in that way and it works or add them to the custom.ini file.

But I would like the ability to use the Deployment Wizard and select the apps if possible and have the install.

Hope that makes sense

Regards Carl

IP address assignment without DHCP does not work

I added MACADDRESS to Priority= line as well as [] section in bootstrap.ini. There is no DHCP/IP helper on the subnet.
The configuration works perfectly in native MDT, but in PSD IP address and other network settings are not assigned and the Network Adapter is set with APIPA.

Litetouch iso boot is getting stuck, no progress

There is no installer folder separately now as in step 9 in this link: https://www.brookspeppin.com/2020/06/26/how-to-setup-powershell-deployment-extension-for-mdt-with-https/

But, continued by selecting the file Install-PSD1 from main root/parent folder.

Then it prompted for wim file, but all the latest windows 10 enterprise/pro versions we download has ESD files, so converted them using this link: https://www.neeosearch.com/esd-wim-converter/

Then, I selected the install.wim file converted and tried to boot the generated litetouch iso file from a virtualbox VM. But it is frozen/stuck on the initial screen itself. No progress.

HTTP deployment share is not setting

After configuring the IIS as per the steps you mentioned.

The deployment share in the Listtouch iso is still trying to access the UNC path.

image

Because of which, the internet deployment is not working

Please suggest how to fix this?

Cannot find path '.\Scripts\PSDWizard.psm1'

Calling the Install-PSD.ps1 ."C:\Users\RS.Grant.Harrington\Scripts\Install-PSD.ps1" -psDeploymentFolder $PSDeployFolder -psDeploymentShare $PSDDS from Powershell CLI (not using ISE)

image

Not an issue so much as a report,

I haven't gotten around to testing the changes that I made, but I went through each script and installation module.

https://github.com/secure-digits-plus-llc/Hybrid-DesiredStateController

There are a lot of projects that I'd like to pursue, but i'm coming to terms with the fact that I may need to take a bit of a break.

Most of what I changed was some formatting, but I also changed a bit of the presentation and tried to reduce the repetitive code.

I added a GUI feature to the installation, so it'll actually ask and provide fields for someone to install the files to where they please. It should create the folder where you tell it to go, but I might have to add a way to add credentials for a folder or to do stuff over CIM or what have you.

I've got some ideas... but I just wanted to let you know that I made the effort to go through them all and I understand the process quite a lot more now.

Thanks for making some updates.

  • MC

Copy-PSDFolder function in PSDUtility.psm1

When copying the OS image from a UNC path to the cache, if there are any spaces in the OS folder, the xcopy line is not interpreted appropriately as it sees spaces as the next parameter.

Line 519 should be:

$null = Start-Process xcopy -ArgumentList """$s"" ""$d"" /s /e /v /d /y /i" -NoNewWindow -Wait -Passthru -RedirectStandardOutput xcopy

Missing break; or bad documentation?

Write-PSDInstallLog -Message "Completed the process for all selected flags now exiting"

The Write-PSDInstallLog -Message on line 688 of the New-PSDWebInstance.ps1 file refers to "now exiting"

elsewhere this phrase precedes a break command, but here there is none.

I don't know enough about what's going on to figure out if the log output is incorrect or if there is a missing break.

Small Regression in PSDUtility.psm1 (Copy-PSDFolder)

Copy-PSDFolder in PSDUtility.psm1 returns the output of

& xcopy $s $d /s /e /v /d /y /i

The output breaks a check with Test-Path in PSDStart.ps1 (Line 563) causing the task sequence to fail

In the old version the output of this was piped to Out-Null. Changing the line back to

& xcopy $s $d /s /e /v /d /y /i | Out-Null

seems to fix the issue.

Cannot bind parameter 'Path' to the target.

I received no errors when running the "Install-PSD.ps1", but when i attempted to import an OS .wim I received this exception message.

System.Management.Automation.ParameterBindingException: Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path 'PSD:\Operating Systems' because it does not exist." ---> System.Management.Automation.SetValueInvocationException: Exception setting "Path": "Cannot find path 'PSD:\Operating Systems' because it does not exist." ---> System.Management.Automation.ItemNotFoundException: Cannot find path 'PSD:\Operating Systems' because it does not exist.
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.SessionStateInternal.GetItem(String[] paths, CmdletProviderContext context)
at System.Management.Automation.SessionStateInternal.GetItem(String[] paths, Boolean force, Boolean literalPath)
at Microsoft.BDD.PSSnapIn.ImportOperatingSystem.set_Path(String value)
at System.Management.Automation.ReflectionParameterBinder.BindParameter(String name, Object value, CompiledCommandParameter parameterMetadata)
--- End of inner exception stack trace ---
at System.Management.Automation.ReflectionParameterBinder.BindParameter(String name, Object value, CompiledCommandParameter parameterMetadata)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at Microsoft.BDD.Wizards.OperatingSystemProgress.WizardProcessing()
at Microsoft.BDD.Wizards.WizardProgress.InitiateWizardProcessing()

/BG

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.