Quantcast
Channel: PowerShell App Deployment Toolkit
Viewing all 2341 articles
Browse latest View live

New Post: Deployment Script: IE11 needs one reboot (x86 and X64) updated for 3.5.0

$
0
0
Wonderful script, I'm going to use this to catch some of my clients who somehow didn't get the update via Software Updates. What was the reason for using DISM to install the updates, instead of wusa. (ex. wusa.exe Windows6.1-KB2888049-x64.msu)?

Commented Unassigned: Miscellaneous Nitpicks [129]

$
0
0
Set-ActiveSetup needs an example for removing an ActiveSetup. I'm guessing:

```
Set-ActiveSetup -Key $installName -PurgeActiveSetupKey
```

------------------------------------------------------------------

Manual Chapter 6 - Needs more TK variables listed/described such as:
$scriptParentPath
$scriptDirectory
$exeWusa (maybe even add example of how to use it with execute-process function)
...


--------------------------------------------------------------------

Please use the HelpMessage Argument in all function declarations. In PowerGUI (and probably other editors too), these HelpMessage popup when you hover over the parameter. It's a lot of work but you don't have to do it all in one shot. The Execute-* cmdlets are probably #1 on my list.

http://technet.microsoft.com/en-us/library/hh847743.aspx
HelpMessage Argument

The HelpMessage argument specifies a string that contains a brief
description of the parameter or its value. Windows PowerShell displays
this message in the prompt that appears when a mandatory parameter value
is missing from a command. This argument has no effect on optional parameters.

The following example declares a mandatory ComputerName parameter and a
help message that explains the expected parameter value.


Param
(
[parameter(mandatory=$true,
HelpMessage="Enter one or more computer names separated by commas.")]
[String[]]
$ComputerName
)


Comments: PowerGui? Do you know if there will be an update to that software? Thanks,

New Post: run the exe as another user?

$
0
0
can this be done? say i would like to copy the content of the toolkit to a location is it possible to run this as a specific user?

New Post: .Net Framework 3.5 requirement for Windows 8.1 with toolkit version 3.5.0

$
0
0
I had the same problem. The solution to put a file named deploy-application.exe.config with the above text in the directory with Application-Deploy.exe worked great!
Thanks!

New Post: Prompting user to close application(s) [Deploy Application Invoker]

$
0
0
Hi,

Need help for closing apps issue.
PSAppDeployToolkit_v3.2.0
Windows 7 64-bit

Whenever trying to close "outlook","lync" services its also trying to close "Deploy Application Invoker" I'm assuming "Deploy Application Invoker" is related to Deploy-Application.exe file. By this its not communicating to SCCM after installation completed.

copying error report from log file.

Thanks in advance.

[09-01-2015 15:20:45] [Pre-Uninstallation] Checking for running applications [communicator.exe,outlook,lync,nlnotes,nnotesmm,notes,notes2,OpenScapeFusion.Lync,Unify.OpenScape]...
[09-01-2015 15:20:45] [Pre-Uninstallation] The following processes are running: [Deploy-Application,lync,OUTLOOK,Unify.OpenScape]
[09-01-2015 15:20:45] [Pre-Uninstallation] Resolving process descriptions...
[09-01-2015 15:20:45] [Pre-Uninstallation] Finished checking running applications.
[09-01-2015 15:20:45] [Pre-Uninstallation] Prompting user to close application(s) [Deploy Application Invoker,Microsoft Lync,Microsoft Outlook,Unify.OpenScape.Exe]...
[09-01-2015 15:20:45] [Pre-Uninstallation] Displaying close applications countdown with [300] seconds.
[09-01-2015 15:21:20] [Pre-Uninstallation] User selected to force the applications to close...
[09-01-2015 15:21:20] [Pre-Uninstallation] Stopping Process Deploy-Application...
[09-01-2015 15:21:20] [Pre-Uninstallation] Stopping Process lync...
[09-01-2015 15:21:20] [Pre-Uninstallation] Stopping Process OUTLOOK...
[09-01-2015 15:21:20] [Pre-Uninstallation] Stopping Process Unify.OpenScape...
[09-01-2015 15:21:22] [Pre-Uninstallation] Checking for running applications [communicator.exe,outlook,lync,nlnotes,nnotesmm,notes,notes2,OpenScapeFusion.Lync,Unify.OpenScape]...
[09-01-2015 15:21:22] [Pre-Uninstallation] Applications are not running.
[09-01-2015 15:21:22] [Pre-Uninstallation] Finished checking running applications.

New Post: Anybody using AppDeployToolkit to deploy package with SCCM 2012 R2?

$
0
0
What do you mean exactly?
I was talking about packages that will only install correctly if they are running under the user context and will not the system. These usually target the current user profile directories and registry hives. Some applications won't install or are missing items but usually install fine when executed as a user.
Are you using full ZTI with application mapping?
No currently we are not using ZTA. We have user based collections tied to AD Groups for User applications paired with UDA and it works great.
How are you handling Pending reboot with PSADT?
We are suppressing pending reboots by changing how the Error Codes react in the Deployment Type for our Core Apps. We have 3 patching cycles with reboots toward the end of our task sequence. :)
We are in a way to migrate from Vista to Windows 8.1/Office 2013
You know Windows 10 and Office 16 should be coming out in a few months ;)
I am actually defining packaging standard with PowerShell.
We had a packaging standard / template that was written in VBscript. It contained predefined functions that I had perfected over the years to make it easy for someone with little experience to just plug in an .MSI and the rest would happen automatically. I was quite proud of myself. I had even some converted to powershell until I found PSADT and there was no longer a need for it. The feeling was bittersweet but I couldn't match its functionality on my own. Now we have a location that holds a stable copy of PSADT with our minor customizations (custom logos, icons and log path) and examples of the commonly used functions that may be needed for deployment. Honestly, we try to keep it is simple as possible if we can. PSADT has the framework to handle the rest.

New Post: Anybody using AppDeployToolkit to deploy package with SCCM 2012 R2?

$
0
0
I was talking about packages that will only install correctly if they are running under the user context and will not the system. These usually target the current user profile directories and registry hives. Some applications won't install or are missing items but usually install fine when executed as a user.
This is really interesting. I was aware some MSI would not react well when install with System account. But it was 5 years ago and I was thinking that problem would be solved?! But installing as user is hard... when users are not local admin. What is your solution?
No currently we are not using ZTA. We have user based collections tied to AD Groups for User applications paired with UDA and it works great.
So you have an AD group for each user? Big job to maintain it?!
We are suppressing pending reboots by changing how the Error Codes react in the Deployment Type for our Core Apps. We have 3 patching cycles with reboots toward the end of our task sequence. :)
This is during OSD but on day to day. I was thinking showing a message to the user with PSADT asking for a reboot and then using fast retry to see if the problem is solve before returning a true error code. Might it be a good idea? The problem I might see would be in OSD because fast retry in OSD... not sure or being sure all reboot happen when need during OS setup...
We had a packaging standard / template that was written in VBscript. It contained predefined functions that I had perfected over the years to make it easy for someone with little experience to just plug in an .MSI and the rest would happen automatically. I was quite proud of myself. I had even some converted to powershell until I found PSADT and there was no longer a need for it. The feeling was bittersweet but I couldn't match its functionality on my own. Now we have a location that holds a stable copy of PSADT with our minor customizations (custom logos, icons and log path) and examples of the commonly used functions that may be needed for deployment. Honestly, we try to keep it is simple as possible if we can. PSADT has the framework to handle the rest.
You are right to be proud. I believe packager, packaging and Scripting is really underestimate. Those people need to be creative all day long. Each software is a challenge. Not many peoples may do that job. I did it during 6 years, hundreads of software. I was really proud too.
What is your average time to create a package for simple to really hard software? I was believing from 2, for a simple, to 6 days for a hard one would be a great estimation.

Created Unassigned: Different format for registry key [136]

$
0
0
Hi,

I just noticed the set-registry is using a registry key format and get-installed is using another standard. Wouldn't be good using only a single standard or being able to use both for set-registry?

About get-installed, the function is returning many interesting value but it would be interesting making it returning the registry path then it would be possible to use that path with set-registry... if both were using the same standard :)

Thanks,

Created Unassigned: Office 2013 example script bugs [137]

$
0
0
You spelled boolean wrong in your example script. It is spelled bloolean which is obviously not a valid type.

Commented Unassigned: When you run as system under SCCM, some Environment Variables are blank. [128]

$
0
0
When you run as system under SCCM, some Environment Variables are blank.
While this is usually not an issue __and not caused by the toolkit__, we recently had a script that depended on %LOGONSERVER% and the script failed when running from SCCM. We ended up sucking the value for %LogonServer% out of the registry when %LogonServer% is blank:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\History]
DCName = "<Value of %LogonServer%>"
or
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\GroupPolicy\History]
DCName = "<Value of %LogonServer%>"


From testing we've found that %HOMEDRIVE% and %HOMEPATH% are also blank when running as system/SCCM. we have yet to determine if these 2 are worth fixing or what value to give them when running as system/SCCM.

Personally, I just care to have the TK fix %LogonServer% when it can. Otherwise set it to UNKNOWN or
NotSet.
Comments: Yeah, some user based environment variables will not be populated in the SYSTEM context. For %LOGONSERVER%, this variable is only populated for a user upon first login when it contacts a domain controller to authenticate the user. As the SYSTEM account never actually logs into a PC like a regular user, this variable does not get populated for the SYSTEM account. Because of this, the script populates a variable called $MachineDomainController so that you can refer to a domain controller when necessary. I did not know that the last domain controller a user authenticated against is stored in the registry. I will do a little bit more research into this registry key and if that is in fact what it is, then I agree that it's a good idea to populate the $envLogonServer variable with this value.

Edited Unassigned: When you run as system under SCCM, some Environment Variables are blank. [128]

$
0
0
When you run as system under SCCM, some Environment Variables are blank.
While this is usually not an issue __and not caused by the toolkit__, we recently had a script that depended on %LOGONSERVER% and the script failed when running from SCCM. We ended up sucking the value for %LogonServer% out of the registry when %LogonServer% is blank:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\History]
DCName = "<Value of %LogonServer%>"
or
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\GroupPolicy\History]
DCName = "<Value of %LogonServer%>"


From testing we've found that %HOMEDRIVE% and %HOMEPATH% are also blank when running as system/SCCM. we have yet to determine if these 2 are worth fixing or what value to give them when running as system/SCCM.

Personally, I just care to have the TK fix %LogonServer% when it can. Otherwise set it to UNKNOWN or
NotSet.

Commented Unassigned: Miscellaneous Nitpicks [129]

$
0
0
Set-ActiveSetup needs an example for removing an ActiveSetup. I'm guessing:

```
Set-ActiveSetup -Key $installName -PurgeActiveSetupKey
```

------------------------------------------------------------------

Manual Chapter 6 - Needs more TK variables listed/described such as:
$scriptParentPath
$scriptDirectory
$exeWusa (maybe even add example of how to use it with execute-process function)
...


--------------------------------------------------------------------

Please use the HelpMessage Argument in all function declarations. In PowerGUI (and probably other editors too), these HelpMessage popup when you hover over the parameter. It's a lot of work but you don't have to do it all in one shot. The Execute-* cmdlets are probably #1 on my list.

http://technet.microsoft.com/en-us/library/hh847743.aspx
HelpMessage Argument

The HelpMessage argument specifies a string that contains a brief
description of the parameter or its value. Windows PowerShell displays
this message in the prompt that appears when a mandatory parameter value
is missing from a command. This argument has no effect on optional parameters.

The following example declares a mandatory ComputerName parameter and a
help message that explains the expected parameter value.


Param
(
[parameter(mandatory=$true,
HelpMessage="Enter one or more computer names separated by commas.")]
[String[]]
$ComputerName
)


Comments: 1) Yes, I will add an example for removing an active setup entry. 2) Yup, I think we need to add a few more variables to the documentation. 3) HelpMessage: I'll take this under consideration and discuss with other developers. To be honest, I am not in favor of adding help messages to the toolkit. The real use case for this PowerShell feature is that if a function is called without specifying the mandatory arguments, then PowerShell will prompt the user to supply a value for the argument. The help message is displayed at this time to help the user input the correct information. The toolkit would not take full advantage of such a use case because we would need to go through and make sure all functions have mandatory variables marked as such and also make sure we are using parameters sets in our function definitions to differentiate what is mandatory in a function based on how it is being used. Also, this type of use case would only be useful in testing as you would never use the toolkit like this when deploying to users. The point about the editor using the help message has some merit, but I think PowerGUI can just as well use the information from the comments field of each function to display information about functions and parameters. This is what PowerShell Studio does and it works great.

Edited Unassigned: Miscellaneous Nitpicks [129]

$
0
0
Set-ActiveSetup needs an example for removing an ActiveSetup. I'm guessing:

```
Set-ActiveSetup -Key $installName -PurgeActiveSetupKey
```

------------------------------------------------------------------

Manual Chapter 6 - Needs more TK variables listed/described such as:
$scriptParentPath
$scriptDirectory
$exeWusa (maybe even add example of how to use it with execute-process function)
...


--------------------------------------------------------------------

Please use the HelpMessage Argument in all function declarations. In PowerGUI (and probably other editors too), these HelpMessage popup when you hover over the parameter. It's a lot of work but you don't have to do it all in one shot. The Execute-* cmdlets are probably #1 on my list.

http://technet.microsoft.com/en-us/library/hh847743.aspx
HelpMessage Argument

The HelpMessage argument specifies a string that contains a brief
description of the parameter or its value. Windows PowerShell displays
this message in the prompt that appears when a mandatory parameter value
is missing from a command. This argument has no effect on optional parameters.

The following example declares a mandatory ComputerName parameter and a
help message that explains the expected parameter value.


Param
(
[parameter(mandatory=$true,
HelpMessage="Enter one or more computer names separated by commas.")]
[String[]]
$ComputerName
)


Commented Unassigned: Feature Request - Get-RegistryKey for loggedon user [132]

$
0
0
I am still trying to learn Powershell, and think I can probably do this with the functions already enabled, but here is my situation:
Running an upgrade with SCCM package/application that needs to uninstall previous version first.
I need to get the value from an HKCU key to find location for "My Documents" folder, which works fine if running Get-RegistryKey as the user, but then the application will not uninstall/upgrade without admin privileges. If running as SCCM / System then the value is blank and an error message pops up trying to use the value as a path.

Is there an easy way to get the HKCU for the logged in user while running in System context as SCCM package? It looks like I should be able to use some combination of Get-UserProfiles, Get-LoggedOnUser and Get-RegistryKey -SID, but I am not sure how to put them all together to get the value out of the registry key. This is a great tool and we really appreciate the frequent updates! Thanks for you help!
Comments: Get-UserProfiles gets you the "User Account SID" for all users that have logged onto the system at any point in time. Then "HKEY_USERS\User Account SID" gets you the HKCU registry hive for a user that is logged in. If this path exists, then the user is logged in.

Closed Unassigned: Feature Request - Get-RegistryKey for loggedon user [132]

$
0
0
I am still trying to learn Powershell, and think I can probably do this with the functions already enabled, but here is my situation:
Running an upgrade with SCCM package/application that needs to uninstall previous version first.
I need to get the value from an HKCU key to find location for "My Documents" folder, which works fine if running Get-RegistryKey as the user, but then the application will not uninstall/upgrade without admin privileges. If running as SCCM / System then the value is blank and an error message pops up trying to use the value as a path.

Is there an easy way to get the HKCU for the logged in user while running in System context as SCCM package? It looks like I should be able to use some combination of Get-UserProfiles, Get-LoggedOnUser and Get-RegistryKey -SID, but I am not sure how to put them all together to get the value out of the registry key. This is a great tool and we really appreciate the frequent updates! Thanks for you help!

Commented Unassigned: Install-SCCMUpdates [133]

$
0
0
Hi ,

I tried to run function install-sccmupdates but i am getting error message that [System.Management.ManagementClass] Installupdates method not fund. MSDN doesnt show that ManagementClass has a method name installupdates.

Are you able to help on this

Thanks
Comments: Is the SCCM client installed on this machne? Can you access this class when you use WBEMTEST: ROOT\CCM:SMS_Client?

Commented Unassigned: Execute-MSI Log Strange Behavior [134]

$
0
0
Hi,

```
Execute-MSI -Action Install -Path $Itemvar_MSI_Name[0] -Parameters $Itemvar_MSI_Name[2]`
-LogName "test.log"

```
In that scenario, I will get test.log_install.log this should be wrong

```
Execute-MSI -Action Install -Path $Itemvar_MSI_Name[0] -Parameters $Itemvar_MSI_Name[2]`
-LogName "test"

```
In that scenario, I will get test_install.log this is correct.
And a log call test.

In the log call test, I see:

```
<![LOG[[Installation] :: Get properties from MSI file [C:\Temp\Vcredist2005_Frv1\Sources\ActivePerl-5.14.3.1404-MSWin32-296513.msi] in table [Property]]LOG]!><time="23:20:11.274-300" date="01-03-2015" component="Get-MsiTableProperty" context="W7SDJ\Client" type="1" thread="34" file="Vcredist2005_Frv1.ps1">
<![LOG[[Installation] :: Get information for installed Product Code [{2B1EE128-27B8-4420-A048-A31E48718779}]...]LOG]!><time="23:20:11.362-300" date="01-03-2015" component="Get-InstalledApplication" context="W7SDJ\Client" type="1" thread="34" file="Vcredist2005_Frv1.ps1">


```



Comments: The -LogName variable expects a log name where the file extension is not specified so that we can build a proper log name which includes whether or not this is an install/uninstall/etc type of log file. Do not use a a file extension when using this variable.

Closed Unassigned: Execute-MSI Log Strange Behavior [134]

$
0
0
Hi,

```
Execute-MSI -Action Install -Path $Itemvar_MSI_Name[0] -Parameters $Itemvar_MSI_Name[2]`
-LogName "test.log"

```
In that scenario, I will get test.log_install.log this should be wrong

```
Execute-MSI -Action Install -Path $Itemvar_MSI_Name[0] -Parameters $Itemvar_MSI_Name[2]`
-LogName "test"

```
In that scenario, I will get test_install.log this is correct.
And a log call test.

In the log call test, I see:

```
<![LOG[[Installation] :: Get properties from MSI file [C:\Temp\Vcredist2005_Frv1\Sources\ActivePerl-5.14.3.1404-MSWin32-296513.msi] in table [Property]]LOG]!><time="23:20:11.274-300" date="01-03-2015" component="Get-MsiTableProperty" context="W7SDJ\Client" type="1" thread="34" file="Vcredist2005_Frv1.ps1">
<![LOG[[Installation] :: Get information for installed Product Code [{2B1EE128-27B8-4420-A048-A31E48718779}]...]LOG]!><time="23:20:11.362-300" date="01-03-2015" component="Get-InstalledApplication" context="W7SDJ\Client" type="1" thread="34" file="Vcredist2005_Frv1.ps1">


```



Commented Unassigned: Multiple Parameters in Execute-Process Function [135]

$
0
0
Hi all,

I love the idea of the PADT, but I run into an issue:

I want to use the Execute-Process function to call a command like

regedit.exe /s "C:\Users\FirstName Last Name\AppData\local\Temp\HKCU.reg"

with a space in the second path parameter. I already tried different syntax of the command but was not able to get it working. Unfortunately you documentation for release 3.5 contains only a simple example

-Parameters '/s'

for this function.

Is there a way to get this working (it should because you have the -Parameters option for this function) and if yes, how looks the syntax for the example above?

If not I guess I want to report this bug which will hopefully fixed quickly by you ;)

Thank you!
Comments: Please give a full example of the Execute-Process command you used so we can see what is not working.

Commented Unassigned: Different format for registry key [136]

$
0
0
Hi,

I just noticed the set-registry is using a registry key format and get-installed is using another standard. Wouldn't be good using only a single standard or being able to use both for set-registry?

About get-installed, the function is returning many interesting value but it would be interesting making it returning the registry path then it would be possible to use that path with set-registry... if both were using the same standard :)

Thanks,
Comments: I don't under stand what you mean by different format/standard. Please give an example of what you're referring to.
Viewing all 2341 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>