Quantcast
Channel: Ivanti User Community : All Content - OS Deployment and Provisioning
Viewing all articles
Browse latest Browse all 1803

Run powershell and DISM in OS provisioning

$
0
0

Hi there,

 

Im currently working on Deploying my Windows 10 Enterprise.

I need to use powershell to Import a default startmenu to my users.

I need to use dism to import Default Application Associations.

 

But i cant get it to work!

 

All these steps are under System Configuration in OS provisioning.

 

First i set powershell execution policy to bypass

Target filename:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Command Line:

Set-ExecutionPolicy bypass -force

 

SUCCESS

 

Then i want to import my Startmenu.xml

 

Target filename:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Command Line:

Import-StartLayout -LayoutPath C:\Winsrc\StartMenu.xml -MountPath C:\

 

I get this message:

 

Import-StartLayout : The term 'Import-StartLayout' is not recognized as the nam

e of a cmdlet, function, script file, or operable program. Check the spelling o

f the name, or if a path was included, verify that the path is correct and try

again.

At line:1 char:1

+ Import-StartLayout -LayoutPath C:\Winsrc\StartMenu.xml -MountPath C:\

+ ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Import-StartLayout:String) [], 

   CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException

 

 

If i try to open powershell on the machine im deploying Win10 and type:

 

Import-StartLayout -LayoutPath C:\Winsrc\StartMenu.xml -MountPath C:\

 

It works perfect...

 

When i Use DISM

Target filename:

C:\Windows\System32\dism.exe

Command Line:

/online /Import-DefaultAppAssociations:C:\Winsrc\DefaultApps.xml

 

I get this message:

 

Deployment Image Servicing and Management tool

Version: 10.0.10586.0

Error: 11

 

You cannot service a running 64-bit operating system with a 32-bit version of DISM.

Please use the version of DISM that corresponds to your computer's architecture.

 

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

 

If i open cmd on the machine im deploying Win10 and type:

 

C:\Windows\System32\dism.exe /online /Import-DefaultAppAssociations:C:\Winsrc\DefaultApps.xml

 

It works perfect...

 

What am im doing wrong here?! Please help!!

 

Regards

Johan


Viewing all articles
Browse latest Browse all 1803

Trending Articles



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