Powershell Syntax working when run in cmd, but when run through SCCM2007 Task Sequence it claims the syntax is incorrect?
The code below is a simple powershell statement which enables me to change the execution policy so that I can run powershell scripts. When I run this in a normal windows enviroment the statement will work fine, not giving me an issue whatsoever. However,
whenever it runs in the task sequence the TS fails. I am running this via the command line option in the task sequence, each time running this step as 3 different types of administrators.
powershell.exe -noninteractive Set-ExecutionPolicy -ExecutionPolicy unrestricted
Checking the log file it states this:
Set-ExecutionPolicy : The term 'Set-ExecutionPolicy' is not recognized as the InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
name of a cmdlet, function, script file, or operable program. Check the InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
spelling of the name, or if a path was included, verify that the path is InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
correct and try again. InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
At line:1 char:1 InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ Set-ExecutionPolicy -ExecutionPolicy unrestricted InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ ~~~~~~~~~~~~~~~~~~~ InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ CategoryInfo : ObjectNotFound: (Set-ExecutionPolicy:String) [], InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
CommandNotFoundException InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ FullyQualifiedErrorId : CommandNotFoundException InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
Failed to run the action: Script Exception.
Incorrect function. (Error: 00000001; Source: Windows) TSManager 13/10/2014 17:28:09 2716 (0x0A9C)
I am new to both SCCM and Powershell, but from my point of view, this should work, considering that the syntax is not actually incorrect? Please could anyone with any idea drop some hints and tips on how to
stop this issue.
I'm not using 3 admin accounts at once if that's how it sounded. I have tried 3 different Admin accounts because I felt that perhaps the difference in permissions may have made a difference in whether I was able to run the syntax and scripts. So I tried
using my own personal administrator account, the SCCMNA account, and the local admin account, which I read worked.
At this point in the task sequence I have:
- Installed the OS
- Connected to the domain
- Installed Applications such as; Flash, Shockware, Reader etc.
Once it has installed the last application within a folder called "Helper Apps" (Which contains various Java and Adobe apps which install fine) it will then run a "Use Toolkit Package" using the MDT toolkit, once this stage is complete
it then progresses to the Script Exception section of the TS.
powershell.exe -noninteractive Set-ExecutionPolicy -ExecutionPolicy unrestricted
I obviously need this to work otherwise I am not allowed to run the script, but because this syntax is "incorrect" it stops the task sequence.
I hope this information might shed some more light on the situation.
Similar Messages
-
Someone gave me a airport express router. it works great with my macbook but when i try to connect via wifi to my iphone it says it can't be set up by "this software". Where can I download whatever software my iphone needs so I can get wifi?
Per chance is your AirPort Express Base Station (AX) an 802.11g model? If so, that is why you are getting this error message from the AirPort Utility running on the iPad. You would need to use either version 5.6 or 5.6.1 running on a Mac or a PC to administer this base station.
-
hello I have imac (27-inch mid 2011) 3.1ghz intel core i5 1tb serial ata hard drive, amd radeon hd 6970m
my problem is
imac works fine in safe mode,
but when you try to startup normal it's connstantly restart by it self.in safe mode works perfectly,soon as I try to boot in normal mode it's keep restarting.on screen I don't see any line vertical or horizontal picture look normal on safe mode.but unable to start normal it just restarting over and over.I try another HDD but same things happen,I replace memory but still same.works ok in safe mode but not in normal mode.I will try to post system error report.
-
I have an Ipad My apple ID and password works for Ibooks and Icloud but when I try to get into the app store it doesn't show my entire email address on the account. When I try to get into the app store it tells me my password is incorrect. How can I correct this? I have been emailing support but so far they have been no help
Open the App Store app, go to the Featured pane, swipe to the bottom, tap the Apple ID and sign out. Tap again and sign in with the Apple ID of your choosing.
-
My iPad2 is set up with my Apple ID and works fine with iTunes. But when I try to use the app store, my wife's apple ID appears in the password window, not mine. How can I get my apple ID to show up?
Sign her out and sign yourself in!
-
I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before?
Start with B5/6 in the 1st linked article.
Time Machine Troubleshooting
Time Machine Troubleshooting Problems -
I am trying to install iTunes in my 64 bit Windows 7 PC. My PC runs normal. But when I try to install Itunes from Apple website, I get a message "The Configuration data for this product is Corrupt contact your support personneI" I
am so disgusted,please help!!!Hey madnest,
Thanks for the question. After reviewing your post, it sounds like you are having difficulty installing iTunes in Windows. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
Issues installing iTunes or QuickTime for Windows
Thanks for using Apple Support Communities.
Have a nice day,
Mario -
I have a Lacie External hdd and on usb 3. Now If I plug in the device it shows a message to connect to windows or mac (Parallels installed) so If I click on mac it works fine well and good but when I select connect to windows it shows a error.
The error that pops up is:
The device "Lacie Rugged USB3-FW" was unable to connect to its ideal host controller.
Please anyone could suggest what the solution could be?
Thanks.But my 1 tb hdd is already formatted via ex fat which can work on both mac and Windows no limitation of file size also like if we use ntfs or fat it has a restriction of 4gb file size.
-
I changed my Apple ID it works when purchasing new apps but when I have updates for my apps my old Apple ID pops up and I can not update, how do I fix this?
If you changed your Apple ID. It should work for new purchases or updates. If you created a new ID, then you have to use the old ID and password in order to update the apps. Purchases are forever tied to the ID used to make the purchase and ID's cannot be combined nor can the purchases.
If you need to sign I to your old ID go to Settings>iTunes & App Store>Apple ID. Tap the ID and sign out, and sign in with the other ID. -
Facetime was normally working on my iphone 4S, but when i changed my sim card it completely disappeared (not even in settings).
Hi
I am also having the same problem. I purchased the iphone 5s (Unlocked) from kuwait. I can use the facetime in my zain sim (kuwait sim) when i change the sim in srilanka (Carrier Dialog) the face time app completely disappears. but in roaming for kuwait sim it works perfectly. before i have purchased iphone 4s from kuwait and it has facetime even in srilanka(carrier Dialog).
Is there any issue with the apple software for 5s? becoz till today no one is able to answer this query?
I hopefully expect a solid answer here.... -
I have Windows 8 64 bit. iTunes works fine with my iPHONE but when I try to go to the iTunes store it loads to about 80% and then the message "iTunes has stopped working"
COPY QTMovieWin.dll FROM c:\program files (x86)\common files\apple\apple application support\ INTO c:\program files (x86)/iTunes"
-
I'm running V7.0, but when I launch Firefox, a page comes up with a heading "Almost there!" followed by a message that this "version is out of date". Then a second normal tab/page of the browser opens.
Yes I close the first tab but it has become a source of irritation since I installed V7.0See these articles for some suggestions:
* https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
* https://support.mozilla.com/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
* http://kb.mozillazine.org/Preferences_not_saved -
IPOD works while plugged into computer, but when I unplug it the whole thing goes dead!
iPOD works while plugged into computer, but when I unplug it the whole thing goes dead.
Plus a Malware thing comes up in iTunes. How do I fix it?!?When connected to the computer is the iPod charging?
What malware comes up?
I suspect that your battery is dead? -
My ipad will not swith on. It was working fine an hour earlier but when I press the power on button nothing happens. I have had it on charge just to be safe but no joy. This is a basic first version ipad. What options do I have?
Try a reset. Press and hold both the home and power buttons 10-15 seconds till the Apple logo appears. Release both buttons. Wait 15-20 seconds till your iPad starts on it's own.
-
my iphone is shutting down and not working with my pc.. but when i plug it to the wall it turns on. and off when i unplugged it.. i tried to reboot but nothing happens.. pls help..
The problem is your friend's music does not belong to you. It is owned by your friend.
I'm afraid you cannot do what you are trying to do. Restoring the iPhone is what you would have to do.
In the future, put your music on the computer and transfer it to the iPhone, not the other way.
Maybe you are looking for
-
Firefox Nightly(28.0a.1) keeps crashing when i try to open it.
I open Nightly, I click something and BAM the crash report comes up and says it crashed so i Click on the button that says 'Restart Nightly' and the same thing happens again. P.S. This all started happening after I updated nightly 28. And also : Trou
-
Won't update, can't download "current" repo list
[max@pwn ~]$ sudo pacman -Syu :: Synchronizing package databases... error: failed to synchronize current: extra 314.8K 350.7K/s 00:00:01 [#####################] 100% community is up to date :: Starting full system upgrade... warning: dvd+rw-tools: fo
-
Which type to use in own method?
Hi there, i am not so good in abap-objects so here is my question: i created a new method in my view in webdynpro for abap. in this method i declared a changing-parameter. this parameter must be of the same type as an internal table declared in my co
-
HT204411 error -42110 comes up when I want to view a rented movie?
why can't i view a rented movie? error -42110 problem in itunes store... try later! But this continues over & over again?
-
How to Import exported mapping in SAP XI
Hello I have a exported mapping from Integration repository file with .xim extension. How we can can import it another XI server. Thanks Chaitanya