myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Runas Task Sequence

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Runas Task Sequence Page: [1]
Login
Message << Older Topic   Newer Topic >>
Runas Task Sequence - 7/11/2008 5:31:05 PM   
wbracken


Posts: 1023
Score: 22
Joined: 4/12/2002
From: St. Louis
Status: offline
I just realized that teh RunAs command line option is gone for Task Sequencing?  Was this an SP1 thing?

Anyway, I have a script that needs to run in the context of a user who has rights to delete a direct membership rule as the last step in my PXE boot sequence. (to remove it from the "Unknown Computers" collection)

Before I start cracking at this anyone have any tricks up their sleeves?  :)

Thanks!

_____________________________

William Bracken

Visit my new Blog
http://wbracken.wordpress.com/
Post #: 1
RE: Runas Task Sequence - 7/14/2008 5:20:17 PM   
rbennett806


Posts: 782
Score: 13
Joined: 6/14/2006
Status: offline
So I'd first suggest backing up a step and looking at your collection and asking yourself why manual intervention is needed. Can't you adjust whatever membership query you're using so that it's dynamic and the resource object is pulled out of that collection when the machine is imaged?

Otherwise, would you want to put the username and password into the script file itself? While I haven't done it during the OSD process, I'd think you'd be able to connect to the SQL database with a set of supplied credentials and use that connection to perform your needed tasks.

Function ConnectToSCCM
' Attempts to use the provided information to connect to the SCCM environment.
On Error Resume Next
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSMS = objLocator.ConnectServer(strSCCMServerFQDN, "root\sms\site_" & strSiteCode, strUserName, strPassword)
If Err then
   Err.Clear
   ConnectToSCCM = "NoAccess"
   Exit Function
End If
ConnectToSCCM = "Accessed"
End Function


Just a thought...

(in reply to wbracken)
Post #: 2
RE: Runas Task Sequence - 7/15/2008 8:49:55 AM   
wbracken


Posts: 1023
Score: 22
Joined: 4/12/2002
From: St. Louis
Status: offline
Thanks for the reply.  The issue I am trying to get around is the direct membership rule that gets created with the PXEFilter.  So effectively I have the PXEFilter script that adds a machine to the specified "Bare Metal" or "Unknown Computers" collection (whatever you choose to call it).  I want to advertise mutliple Task seqeunces as options to choose from for this type of deplyment (ie. run from server, download and execute, complete backup then reimage, diagnostics boot cd, etc.)  this requires me to NOT make the adverts mandatory.  If the machine is then left in the Collection, after the user logs on they get the nice little pop up that show the other Task Seqeunces that are advertised to that Collection as available programs.  This scenerio will without a doubt cause people to re-image their machines by accident.  I dont ever want to present the end user with an "option" to re-image.  I want it to be controlled by IT and by the time the user sees it is should be mandatory.

Too my knowledge adding a query based rule to the collection will only affect members that are dymanically added to the collection, leaving the direct memberships intact.  Is there a trick to this?

I will give your code above a shot.  If you have any other suggestions though please do tell!! 

Thanks!

_____________________________

William Bracken

Visit my new Blog
http://wbracken.wordpress.com/

(in reply to rbennett806)
Post #: 3
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Runas Task Sequence Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.234