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

Commented Unassigned: Issue with Execute-MSI logic in 3.5.0? [97]

$
0
0
Hi,
I'm testing the beta 3.5.0 on Win7x64, deploying via SCCM2012, using deploy-application.exe.

For this app I need to first uninstall the previous version as it cannot handle an upgrade. When I attempt any uninstall as shown below, the logs show that it detects the installed app ok but doesnt uninstall it, instead it notes it will skip the 'install' as the MSI is already installed.

I believe this is caused by the check at line 1952, which does not take into account the $action value, which should, if its anything other than "Install", skip the detection as any 'Uninstall/Repair/etc' of course requires the MSI installed.

Or let me know if I've implemented my action statements incorrectly(!)


Deploy-Application.ps1 excerpt:
...
## <Perform Pre-Installation tasks here>
Execute-MSI -Action Uninstall -Path '{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}' # Uninstall ver 2.3.x
...

Log shows it finds this version installed, but instead of uninstalling it instead 'skips installation'
...
[Pre-Installation] :: Found installed application [Salesforce for Outlook - (Production Release 2.3.05.1231) - P1] version [2.3.05.1231] matching product code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}] Get-InstalledApplication 11/11/2014 4:51:03 PM 1 (0x0001)
[Pre-Installation] :: The MSI is already installed on this system. Skipping installation... Execute-MSI 11/11/2014 4:51:03 PM 1 (0x0001)
...


I addedthe logic (-and $action -eq 'Install') as below and it then works, but that IF statement should really go above the Get-InstalledApplication check for efficiency:
...
[psobject]$IsMsiInstalled = Get-InstalledApplication -ProductCode $MSIProductCode
If ($IsMsiInstalled -and $action -eq 'Install') {
Write-Log -Message 'The MSI is already installed on this system. Skipping installation...' -Source ${CmdletName}
}
Else {
...

Thanks for the effort you guys have put into this new release, lots of good updates here!

Comments: Thanks for reporting this issue. The latest beta 3.5.0 has the fix integrated now.

Source code checked in, #63001e8084eaa859d7dbb072cbc3113bff22b7ab

$
0
0
Fixed issue in Show-InstallationPrompt and Show-InstallationWelcome where timeout object was not disposed and would cause timeout of subsequent UI components Merge branch 'master' of https://git01.codeplex.com/psappdeploytoolkit Conflicts: Toolkit/AppDeployToolkit/AppDeployToolkitMain.ps1

Commented Unassigned: Close applications countdown timeout without reason. [96]

$
0
0
Hi,

Firstly, congratulations for your work.

I encounter a problem unexplained when deploying one of my applications.

After 5 minutes of the applications countdown, the error code 1618 is returned directly before the time limit set at 25 minutes.

The problem always occur.

Here are the logs and I put you an attachment with the entire file.

```
[06-11-2014 17:11:11] [Initialization] ********** setup started.
[06-11-2014 17:11:11] [Initialization] Script [C:\Windows\ccmcache\w\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Windows\ccmcache\w\AppDeployToolkit\AppDeployToolkitMain.ps1]
[06-11-2014 17:11:11] [Initialization] ********** script version is [1.0.0]
[06-11-2014 17:11:11] [Initialization] Deploy Application script version is [3.1.2]
[06-11-2014 17:11:11] [Initialization] The following non-default parameters were passed to [Deploy Application]: [-DeploymentType Install]
[06-11-2014 17:11:11] [Initialization] App Deploy Toolkit Main script version is [3.2.0]
[06-11-2014 17:11:11] [Initialization] App Deploy Toolkit Extensions version is [1.0.0]
[06-11-2014 17:11:11] [Initialization] PowerShell version is [2.0 x64]
[06-11-2014 17:11:11] [Initialization] PowerShell host is [ConsoleHost version 2.0]
[06-11-2014 17:11:11] [Initialization] OS version is [Microsoft Windows 7 Entreprise 64 bits 6.1.7601]
[06-11-2014 17:11:11] [Initialization] Hardware platform is [Physical]
[06-11-2014 17:11:11] [Initialization] Computer name is [******]
[06-11-2014 17:11:11] [Initialization] Current user is [********]
[06-11-2014 17:11:11] [Initialization] Current Culture is [fr-FR] and UI language is [FR]
[06-11-2014 17:11:11] [Initialization] Deployment type is [Installation]
[06-11-2014 17:11:11] [Initialization] Script [C:\Windows\ccmcache\w\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\w\Deploy-Application.ps1]
[06-11-2014 17:11:11] [Initialization] The following users are logged on to the system: **********
[06-11-2014 17:11:11] [Initialization] Session 0 not detected.
[06-11-2014 17:11:11] [Initialization] Installation is running in [Interactive] mode.
[06-11-2014 17:11:11] [Pre-Installation] Testing power connection status...
[06-11-2014 17:11:11] [Pre-Installation] AC Power connection not found
[06-11-2014 17:11:11] [Pre-Installation] Displaying custom installation prompt with the non-default parameters: [(Title=Mise à jour de votre poste de travail) (Message=Les applications suivantes doivent être fermés et sauvegardés : Internet Explorer, Mozilla Firefox, VLC, Adobe Reader, Java, PDFCreator.

En cas d'inactivité et d'applications concernées non ouvertes, la mise à jour se lancera automatiquement au bout de 5 minutes. Si les applications sont ouvertes l'installation se lancera plus tard.

L'ordinateur devra redémarrer après l'installation.) (Icon=Shield) (ButtonMiddleText=OK) (PersistPrompt=True) (__Timeout=300__) (ExitOnTimeout=False)]...
[06-11-2014 17:11:13] [Pre-Installation] Checking for running applications [iexplore,AcroRd32,cidaemon,firefox,java,jp2launcher,pdfcreator,vlc]...
[06-11-2014 17:11:13] [Pre-Installation] The following processes are running: [firefox]
[06-11-2014 17:11:13] [Pre-Installation] Resolving process descriptions...
[06-11-2014 17:11:13] [Pre-Installation] Finished checking running applications.
[06-11-2014 17:11:13] [Pre-Installation] Prompting user to close application(s) [Firefox]...
[06-11-2014 __17:11:13__] [Pre-Installation] Displaying close applications countdown with [__1200__] seconds.
[06-11-2014 __17:16:11__] [Pre-Installation] Installation not actioned within a reasonable amount of time.
[06-11-2014 17:16:11] [Pre-Installation] Installation not actioned within a reasonable amount of time.
[06-11-2014 17:16:11] [Pre-Installation] Setting deferral history...[DeferTimesRemaining = 0]
[06-11-2014 17:16:11] [Pre-Installation] Updating registry key: [Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\*************] [DeferTimesRemaining = 0]...
[06-11-2014 17:16:11] [Pre-Installation] ************** Installation completed with __exit code [1618]__.
[06-11-2014 17:16:11] [Pre-Installation] ----------------------------------------------------------------------------------------------------------
```

Don't hesitate to try the attachment to see what happen.

Thank's ! (I think it's a bug of the psapp script.)
Comments: Thanks for reporting this - I found an issue with the timer disposal, can you check the latest 3.5 beta in the "source code" tab and see if this resolves the issue?

Source code checked in, #0bf95bd1a237d1eeb0320cb9fa4cae599e9d47b4

$
0
0
Revert "Fixed issue in Show-InstallationPrompt and Show-InstallationWelcome where timeout object was not disposed and would cause timeout of This reverts commit 38cf6490be5371c4b56efadd6a593846b444cbdb. Conflicts: Toolkit/AppDeployToolkit/AppDeployToolkitMain.ps1

Source code checked in, #b738bae323100fb43a3e7b8534150b4e792d9c53

$
0
0
Remove unused parameter in Get-InstalledApplication,, improve logging Improved logging in Remove-MSIApplications. Remove unused parameter listed in comments of Get-InstalledApplication

Source code checked in, #d24ead90ad0a5aa85f1046ee7e437b9027a4b5d0

$
0
0
Added Template_New-Function.ps1 to Sources Folder Added Template_New-Function.ps1 to Sources Folder

Commented Unassigned: Issue with Execute-MSI logic in 3.5.0? [97]

$
0
0
Hi,
I'm testing the beta 3.5.0 on Win7x64, deploying via SCCM2012, using deploy-application.exe.

For this app I need to first uninstall the previous version as it cannot handle an upgrade. When I attempt any uninstall as shown below, the logs show that it detects the installed app ok but doesnt uninstall it, instead it notes it will skip the 'install' as the MSI is already installed.

I believe this is caused by the check at line 1952, which does not take into account the $action value, which should, if its anything other than "Install", skip the detection as any 'Uninstall/Repair/etc' of course requires the MSI installed.

Or let me know if I've implemented my action statements incorrectly(!)


Deploy-Application.ps1 excerpt:
...
## <Perform Pre-Installation tasks here>
Execute-MSI -Action Uninstall -Path '{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}' # Uninstall ver 2.3.x
...

Log shows it finds this version installed, but instead of uninstalling it instead 'skips installation'
...
[Pre-Installation] :: Found installed application [Salesforce for Outlook - (Production Release 2.3.05.1231) - P1] version [2.3.05.1231] matching product code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}] Get-InstalledApplication 11/11/2014 4:51:03 PM 1 (0x0001)
[Pre-Installation] :: The MSI is already installed on this system. Skipping installation... Execute-MSI 11/11/2014 4:51:03 PM 1 (0x0001)
...


I addedthe logic (-and $action -eq 'Install') as below and it then works, but that IF statement should really go above the Get-InstalledApplication check for efficiency:
...
[psobject]$IsMsiInstalled = Get-InstalledApplication -ProductCode $MSIProductCode
If ($IsMsiInstalled -and $action -eq 'Install') {
Write-Log -Message 'The MSI is already installed on this system. Skipping installation...' -Source ${CmdletName}
}
Else {
...

Thanks for the effort you guys have put into this new release, lots of good updates here!

Comments: Thanks, but I tested the latest commit from the Source tab, and this change has introduced another issue due to the extra Else thats been added further down (line 1976). My 'Deploy-Application.ps1' has: ``` ## <Perform Pre-Installation tasks here> Execute-MSI -Action Uninstall -Path '{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}' # Uninstall ver 2.3.x Execute-MSI -Action Uninstall -Path '{6ACA47BD-D211-45CC-9FF4-70996A7D36E6}' # Uninstall ver 2.6.x to allow for reinstalls ## Remove-MSIApplications -Name 'Salesforce for Outlook' ##*=============================================== ##* INSTALLATION ##*=============================================== [string]$installPhase = 'Installation' ## <Perform Installation tasks here> Execute-MSI -Action Install -Path "SalesforceForOutlook.msi" -Transform "Salesforce_for_Outlook_2.6.01.1717_P1.mst" ``` And the install log shows: ``` [Pre-Installation] :: Resolve product code to a publisher, application name, and version. Execute-MSI 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: Get information for installed Product Code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}]... Get-InstalledApplication 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: Get information for installed Product Code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}]... Get-InstalledApplication 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: The MSI is not installed on this system. Skipping action [$Action]... Execute-MSI 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: Resolve product code to a publisher, application name, and version. Execute-MSI 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: Get information for installed Product Code [{6ACA47BD-D211-45CC-9FF4-70996A7D36E6}]... Get-InstalledApplication 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: Get information for installed Product Code [{6ACA47BD-D211-45CC-9FF4-70996A7D36E6}]... Get-InstalledApplication 11/12/2014 4:07:53 PM 1 (0x0001) [Pre-Installation] :: The MSI is not installed on this system. Skipping action [$Action]... Execute-MSI 11/12/2014 4:07:54 PM 1 (0x0001) [Installation] :: Get properties from MSI file [C:\Windows\ccmcache\11\Files\SalesforceForOutlook.msi] in table [Property] Get-MsiTableProperty 11/12/2014 4:07:54 PM 1 (0x0001) [Installation] :: Get information for installed Product Code [{6ACA47BD-D211-45CC-9FF4-70996A7D36E6}]... Get-InstalledApplication 11/12/2014 4:07:54 PM 1 (0x0001) [Installation] :: The MSI is not installed on this system. Skipping action [$Action]... Execute-MSI 11/12/2014 4:07:54 PM 1 (0x0001) [Post-Installation] :: Bypassing Installation Prompt [Mode: NonInteractive]... Salesforce.com Salesforce For Outlook 2.6.01.1717 has completed installation. Show-InstallationPrompt 11/12/2014 4:07:54 PM 1 (0x0001) [Post-Installation] :: Bypass Installation Restart Prompt [Mode: NonInteractive] Show-InstallationRestartPrompt 11/12/2014 4:07:54 PM 1 (0x0001) [Post-Installation] :: Remove deferral history... Exit-Script 11/12/2014 4:07:55 PM 1 (0x0001) [Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Salesforce.com_SalesforceForOutlook_2.6.01.1717_x32_EN_P1] Convert-RegistryPath 11/12/2014 4:07:55 PM 1 (0x0001) [Post-Installation] :: Delete registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Salesforce.com_SalesforceForOutlook_2.6.01.1717_x32_EN_P1] Remove-RegistryKey 11/12/2014 4:07:55 PM 1 (0x0001) [Post-Installation] :: Salesforce.com_SalesforceForOutlook_2.6.01.1717_x32_EN_P1 Installation completed with exit code [0]. Exit-Script 11/12/2014 4:07:55 PM 1 (0x0001) ``` I'm uninstalling an earlier version as well as the most recent version (so I can use this to reinstall as needed) and then I want to install the latest, but it skips instead of installing. Also note the $Action var isnt resolving in the log because your Write-Log lines have single quotes and should be double. I changed that in my version and can confirm that last $action is an 'Install' action.

Source code checked in, #2ce6a40df1b8cf99bb94fe9c348cd9b4406430b2

$
0
0
Fixed issue in Execute-MSI where some MSI actions are not executed properly Fixed issue in Execute-MSI where some MSI actions are not executed properly

Commented Unassigned: Issue with Execute-MSI logic in 3.5.0? [97]

$
0
0
Hi,
I'm testing the beta 3.5.0 on Win7x64, deploying via SCCM2012, using deploy-application.exe.

For this app I need to first uninstall the previous version as it cannot handle an upgrade. When I attempt any uninstall as shown below, the logs show that it detects the installed app ok but doesnt uninstall it, instead it notes it will skip the 'install' as the MSI is already installed.

I believe this is caused by the check at line 1952, which does not take into account the $action value, which should, if its anything other than "Install", skip the detection as any 'Uninstall/Repair/etc' of course requires the MSI installed.

Or let me know if I've implemented my action statements incorrectly(!)


Deploy-Application.ps1 excerpt:
...
## <Perform Pre-Installation tasks here>
Execute-MSI -Action Uninstall -Path '{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}' # Uninstall ver 2.3.x
...

Log shows it finds this version installed, but instead of uninstalling it instead 'skips installation'
...
[Pre-Installation] :: Found installed application [Salesforce for Outlook - (Production Release 2.3.05.1231) - P1] version [2.3.05.1231] matching product code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}] Get-InstalledApplication 11/11/2014 4:51:03 PM 1 (0x0001)
[Pre-Installation] :: The MSI is already installed on this system. Skipping installation... Execute-MSI 11/11/2014 4:51:03 PM 1 (0x0001)
...


I addedthe logic (-and $action -eq 'Install') as below and it then works, but that IF statement should really go above the Get-InstalledApplication check for efficiency:
...
[psobject]$IsMsiInstalled = Get-InstalledApplication -ProductCode $MSIProductCode
If ($IsMsiInstalled -and $action -eq 'Install') {
Write-Log -Message 'The MSI is already installed on this system. Skipping installation...' -Source ${CmdletName}
}
Else {
...

Thanks for the effort you guys have put into this new release, lots of good updates here!

Comments: Hey, thanks for testing. I just updated the logic in the latest commit under the Sources tab. Please test and let me know if this resolves the issue.

Source code checked in, #f0b0c59fa00861571f2c359b2c482032526880d4

$
0
0
Add .gitattributes file Add .gitattributes file to repo to auto detect text files and perform LF normalization to avoid issues with submitting changes from different platforms

New Post: Test-Battery but how can i use the result

$
0
0
it was to late to work yesterday. it´s so simple. sry for question.

Source code checked in, #b11be6399e376fa9bf6f4f8762a20a8e275a3cd6

$
0
0
Fixed issue in Deploy-Application.ps1 Fixed issue in Deploy-Application.ps1 where text had single quotes instead of double

Source code checked in, #a3fefe09087dc9f344afca632abf1860a91bce78

$
0
0
Updated Date in Deploy-Application.ps1 Updated Date in Deploy-Application.ps1

Source code checked in, #39e5ad0752a67eb900e0ae9e26da91d2f5635d62

$
0
0
Updated Date in Testing Deploy-Application.ps1 Updated Date in Testing Deploy-Application.ps1

Commented Unassigned: Calling Deploy-Application.exe with parameters does not work in windows 7 [91]

$
0
0
If I use the Deploy-Application.EXE –DeploymentType "Install" -DeployMode "NonInteractive" it does nothing in Windows 7. I have to run just the Deploy-Application.exe in order for it to work. If I add any parameter it stops working.
Calling the script directly like this .\Deploy-Application.ps1 –DeploymentType "Install" -DeployMode "NonInteractive" works.
In windows 8 everything works as expected.

I had this problem using SCCM I could not figure out why the Application did not install, after I tried the command manually I saw that not even the log folder is being created.


Great job by the way this toolkit is a lifesaver :)
Comments: Are you sure to have the correct hyphens. In Word often the - is replaced by another character – and in your code above I also see different hyphen characters. remove the – and replace with a typed - Grtx, Ben

Commented Unassigned: PSADK invoked by ccmexec runs noninteractive [98]

$
0
0
Intent:
to run PSADK interactive in all cases to allow users to close apps.
Cmdline in SCCM: Deploy-Application.ps1 -DeploymentType "Install" -DeployMode "Interactive

Env:
WIn7x64, SCCM 2012, App model
With a mand. deployment (Required) set as:
Install for System
Whether or not a user is logged on
Normal

Issue:
when testing while viewing Software Center, if the job is kicked off automatically (by Ccmexec.exe?) then the script runs 'noninteractive', regardless of the cmdline switch above. In this case the script shows no dialogs and shuts down open apps without prompting. See Log1 below.

However, if a user starts the install from Software Center (SCClient.exe) manually (say if the previous script run failed, and the option to allow users to manually install is set in the SCCM deployment options) then the log shows the run is 'interactive' and dialogs show as expected. Log2 below.

Why the difference? The expectation should be to run this 'interactive' in all cases no? I can see the difference is the process used to initiate it is under the context of System in Log1 and a user in Log2, but even if System starts it the script should run interactive to allow logged in users to see dialogs.


Both logs used these params;
[Initialization] :: The following non-default parameters were passed to [Deploy Application]: [-DeployMode Interactive -DeploymentType Install] PSAppDeployToolkit 13/11/2014 12:04:01 p.m. 1 (0x0001)


Log1 snippet (user logged in, ccmexec initiated):
```
[Initialization] :: Deployment type is [Installation] PSAppDeployToolkit 13/11/2014 11:58:30 a.m. 1 (0x0001)
[Initialization] :: Script [C:\Windows\ccmcache\12\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\12\Deploy-Application.ps1] PSAppDeployToolkit 13/11/2014 11:58:30 a.m. 1 (0x0001)
[Initialization] :: Get session information for all logged on users. Get-LoggedOnUser 13/11/2014 11:58:30 a.m. 1 (0x0001)
[Initialization] :: The following users are logged on to the system: CPS\zintegrator PSAppDeployToolkit 13/11/2014 11:58:31 a.m. 1 (0x0001)
[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM] PSAppDeployToolkit 13/11/2014 11:58:31 a.m. 1 (0x0001)
[Initialization] :: There is no console user logged in (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 13/11/2014 11:58:31 a.m. 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 13/11/2014 11:58:31 a.m. 1 (0x0001)
[Initialization] :: Session 0 detected, process not running in user interactive mode: deployment mode set to [NonInteractive]. PSAppDeployToolkit 13/11/2014 11:58:31 a.m. 1 (0x0001)
[Initialization] :: Installation is running in [NonInteractive] mode. PSAppDeployToolkit 13/11/2014 11:58:31 a.m. 1 (0x0001)

```

Log2 snippet (user logged in, user initiated in SC):
```
[Initialization] :: Deployment type is [Installation] PSAppDeployToolkit 13/11/2014 12:04:02 p.m. 1 (0x0001)
[Initialization] :: Script [C:\Windows\ccmcache\12\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\12\Deploy-Application.ps1] PSAppDeployToolkit 13/11/2014 12:04:02 p.m. 1 (0x0001)
[Initialization] :: Get session information for all logged on users. Get-LoggedOnUser 13/11/2014 12:04:03 p.m. 1 (0x0001)
[Initialization] :: The following users are logged on to the system: CPS\zintegrator PSAppDeployToolkit 13/11/2014 12:04:03 p.m. 1 (0x0001)
[Initialization] :: Current process is running under a user account [CPS\zintegrator] PSAppDeployToolkit 13/11/2014 12:04:03 p.m. 1 (0x0001)
[Initialization] :: There is no console user logged in (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 13/11/2014 12:04:03 p.m. 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 13/11/2014 12:04:03 p.m. 1 (0x0001)
[Initialization] :: Session 0 detected, process running in user interactive mode. PSAppDeployToolkit 13/11/2014 12:04:03 p.m. 1 (0x0001)
[Initialization] :: Installation is running in [Interactive] mode. PSAppDeployToolkit 13/11/2014 12:04:03 p.m. 1 (0x0001)

```
Comments: Under "Env", you describe how you have your Application model package set up. I see that the it says "Install for System whether or not a user is logged on." To get the desired result that you want, you have to select the option to "Allow the user to view and interact with the program installation." The option "Allow the user to view and interact with the program installation" can only be selected if you also select the logon requirement to run "Only when a user is logged on". Can you please verify that you have your package set up this way? I suspect that it might not be.

Source code checked in, #4d53fcd1a45cd9469a854c2ca2ab4f4700d33191

$
0
0
Added logging of all User Session Details Added logging of all user session details

Source code checked in, #1b7359a00118a2e91cbfd88e37e0d8f6ac540785

$
0
0
Update modify date in AppDeployToolkitMain.ps1 Update modify date in AppDeployToolkitMain.ps1

New Post: Regarding the SCCM limitation with Applications and "allow user to interact with program installation"

$
0
0
I found the problem, it's line 45:
Set-ExecutionPolicy -ExecutionPolicy 'ByPass' -Scope 'Process' -Force -ErrorAction 'SilentlyContinue'

It returns:
Set-ExecutionPolicy : Windows PowerShell updated your execution policy
successfully, but the setting is overridden by a policy defined at a more
specific scope.  Due to the override, your shell will retain its current
effective execution policy of Unrestricted. Type "Get-ExecutionPolicy -List"
to view your execution policy settings. For more information please see
"Get-Help Set-ExecutionPolicy".
At line:1 char:1
+ Set-ExecutionPolicy -ExecutionPolicy 'ByPass' -Scope 'Process' -Force
-ErrorActi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : PermissionDenied: (:) [Set-ExecutionPolicy], Sec
   urityException
    + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Com
   mands.SetExecutionPolicyCommand

New Post: Regarding the SCCM limitation with Applications and "allow user to interact with program installation"

$
0
0
That's very strange. So even though it's set to silently continue upon error, you're saying that the script fails at this point because of an attempt change the execution policy. The policy set via GPO takes precedence and the execution policy is not changed, but your script stops executing. If that is the case, then I guess we just have to take that line out so people that define their policy via GPO can run the script.
Viewing all 2341 articles
Browse latest View live


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