Saving variables to use after restart.

Hi,
I have a pretty simple script which makes a few changes to the registry, firewall and ip settings.  However after the restart and the registry 'runonce' is read to continue the scripts latter stages which include AD promotion.  However all
the variables from earlier in the script are lost.
Is there a way to store these in txt files, registry entries or similar.  Id rather all the requests for information from the user were asked at the beginning leaving the script to run in the background after restart.
Thanks for any help

You can use   Export-Clixml & Import-Clixml
http://technet.microsoft.com/en-us/library/hh849916.aspx
Get-Variable MyVa* | Export-Clixml MyVars.xml
Import-Clixml .\MyVars.xml | %{ Set-Variable $_.Name $_.Value }
bye Gas
Gastone Canali >http://www.armadillo.it
Se alcuni post rispondono al tuo quesito(non necessariamente i miei), ricorda di contrassegnarli come risposta e non dimenticare di contrassegnare anche i post utili. GRAZIE! Ricorda di dare un occhio ai link
Click Here andHere

Similar Messages

  • I set up the primary language to English while initializing the MBP, but at the log-in page, the language appears to be a foreign language I don't use, after restart, the language turned into English, has anyone come across the same problem

    I set up the primary language to English while initializing the MBP, but at the log-in page, the language appears to be a foreign language I don't use, after restart, the language turned into English, has anyone come across the same problem, and is that normal?

    i have a similar problem...It seems to be tied to my guest account. It is set to Japanese as primary language but my main login is set to English. I tried changing the guest account to english but the change won't hold. It always reverts to Japanese.

  • Cache not used after restart?

    Hi,
    I run reports (10g) with URLs like this:
    http://my_server/reports/rwservlet?pdf&report=my_report.rdf&some_param=368902
    In the cgicmd.dat I have:
    pdf: userid=user/password@orcl desformat=PDF destype=cache tolerance=518400 %*
    Tolerance is 360 days here, I know.
    OK, I run a report. It's generated and the PDF is saved in the cache. Fine.
    I wait an hour, or five, and run it again (same URL). I get it from cache. Great!
    Next day I run it again. Now it's re-generated and a new PDF is saved in cache. Why?
    The first PDF is still there, both are the same size. So reports server "forgot" it had a copy in the cache.
    During the night everything was stopped for backup; database, reports server, Apache, the lot.
    I thought the reports requests were kept in a table and a database bounce would not clear the cache knowledge.
    Am I missing something? Why cant I get the report from cache the next day?
    Kind regards
    Tomas Albinsson
    Stockholm, Sweden

    Hi Swati,
    I think the cache consists of two parts (that I know of): the folder on disk where the files (in my case PDF) are stored after each run, and a table in the database.
    The table has a record for each reports request. For instance with the parameters used, how else can it determine if the cached file can be used?
    That record should also state the tolerance of each request, i.e. if it is OK to reuse a file.
    If the above is true, a database restart should be no problem.
    Kind regards
    Tomas
    Edited by: tomalb on Jan 20, 2009 9:08 AM - typos

  • Content block not saved after restart firefox in windows 7

    We know there is an option to block content like images by right click on it and select "block images from xxx.xxx.com", first time it worked and checked it from the menu, tools-options-content-exception (load images automatically) and the item is there. But After restart firefox its gone. dont know why? Pls help. (all other setting is ok and saved).
    Using Windows 7 Ult, Firefox 3.
    == This happened ==
    Every time Firefox opened

    Yes, I used clear recent history, with Site Preferences. Dose this anything to do with it?

  • Have reformatted my Imac using original discs (installed leopard (10.5)) tried to do the software update but it cant download the itunes update and when it gets to the configure update screen after restart for main update, it just gets stuck. HELP!

    have reformatted my Imac using original discs (installed leopard (10.5)) tried to do the software update but it cant download the itunes update and when it gets to the configure update screen after restart for main update, it just gets stuck. HELP!
    The configure bar gets about an 1/8 full and then just does nothing. I think its lists the update as combo update? cant remember with out checking.
    I have tried to do the disk verify and repair but this has made no difference.
    Please let me know what i need to do, I have reformatted the mac just to start over as was clogged with a lot of useless data, I had installed lion (10.7) from the app store previously and now cant seem to find a way to re install lion. I hope I dont need to pay for it again?

    If you erased your hard drive, you'll need to reinstll OS X 10.6 Snow Leopard to access the App store. You won't have to pay for OS X 10.7 Lion again. Did you try booting to the recovery partition by holding the command and r keys down? If that's still there, you can reinstall OS X 10.7 from there.
    If you're looking to install the current iTunes, you need OS X 10.6.8 at a minimum.
    If you're still trying to update OS X 10.5 Leopard, you can download the combo update from here.  Download, use Disk Utility to repair permissions, apply the update, then repair permissions again. That will take you to OS X 10.5.8.

  • Pages is not saving document correctly.  After saving the changes either do not appear or you can not open the file. The error is "not a valid format"  I am in Pages '09 4.1 (923).  I also use Parallels.  Anyone having similar issues?

    Pages is not saving document correctly.  After saving the changes either do not appear or you can not open the file. The error is "not a valid format"  I am in Pages '09 4.1 (923).  I also use Parallels.  Anyone having similar issues?

    I'm not sure that Lion AutoSave feature apply to network servers.
    I'm just sure that the Versions feature doesn't.
    Yvan KOENIG (VALLAURIS, France) samedi 21 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • Signature drop down menu greyed out. I believe it is because I saved the pdf document after placing a signature.  I'm using Adobe Acrobat Pro 9

    signature drop down menu greyed out. I believe it is because I saved the pdf document after placing a signature.  I'm using Adobe Acrobat Pro 9

    Do you mean the drop-down list that shows up when you right-click on the signature (in the Signature Panel or signature field)?
    I do not think that just saving a PDF with no changes would result in that unless you somehow flattened the PDF.
    Can you see the signature in the Signature Panel? Can you expand ([+] at left) the signature? Does the Signature Panel provide info for this signature? Is the signature validated? If "yes" then is the signature status Valid?
    It could be that when you saved the file you somehow flattened the signature, so that now you have only signature appearance in the PDF but not a real signature field which contains all signature properties. If the Signature Panel does not contain your signature (enpty if your signature was the only one) then this is the most likely cause.

  • My Finder / User preferences never saved after Restart. Help!

    After a "successful" back-up from Time Machine (thanks, Time Machine), my files seem to all be here, but my Finder and basic Application preferences have never been the same since.
    My MacBook Pro 17" hard drive crashed. I had an authorized Apple repair replace it with a new drive. I restored my set-up via Time Machine as instructed and was happy to see I was (mostly) back in good shape.
    What HASN'T been the same since - when I RESTART:
    - Whenever I shut down/restart, my desktop will always revert back to the last "mode" pre-crash. For example, one same folder is always open, as it happened to be the folder opened during the crash. Now, no matter what I seem to have opened on my desktop before I shut down, that other "old" folder always greets me after a restart.
    - Many applications I notice do not "remember" the last settings changed/used, always reverting to the "pre-crash" setting. Notable examples:
    - iChat settings (buddy icon, status, etc.) must ALWAYS be manually adjusted when I open iChat now.
    - iTunes and iPhoto are a big drag to open, because I must always "find" my libraries. They have long been moved to an external drive, but these iApps always ask me to locate them or create new ones. Even if I attempt to change my preferences.
    - Dock: the settings/icons revert back to the "pre-crash" version, and since I have updated many Apps, several icons show the Question Mark symbol, as some old Apps are long gone.
    I tried Disk Utility, repairing permissions. It recognized many inconsistencies and problems,
    but the repairs never seem to "stick."
    Again, this happens each time I restart/reboot.
    So if I only put my MacBook to sleep mode, it does fine when it wakes up,
    and remembers desktop settings, iChat settings, etc.
    Therefore, I only rarely shut down now, to avoid my Groundhog's Day syndrome.
    This is annoying. Help Me. Someone. Please.

    Bernie Hawaii wrote:
    After a "successful" back-up from Time Machine (thanks, Time Machine), my files seem to all be here, but my Finder and basic Application preferences have never been the same since.
    Apparently the previous preferences were copied over by TM.
    First it would probably be a good idea to start up from the install disk and run Disk Utilities’ Repair Disk. If you don’t know how to do that, reply back for specific directions.
    - Whenever I shut down/restart, my desktop will always revert back to the last "mode" pre-crash. For example, one same folder is always open, as it happened to be the folder opened during the crash. Now, no matter what I seem to have opened on my desktop before I shut down, that other "old" folder always greets me after a restart.
    Because it appears to be preference files that cause the problem, you can begin removing them from the Preferences folder. These .plist files can be moved to the Desktop and the system will recreate new ones in the Preferences folder. If removing the .plist file doesn’t help, the one on the desktop can be moved back into the Preferences folder to replace the newly created one.
    Locate the Preference folder by this path:
    Macintosh HD/Users/yourusername/Library/Preferences
    (where “yourusername” is the short name of your computer, like hawaii - the folder looks like a house/home)
    Often users confuse the above path with Macintosh HD/Library/Preferences. That is not the one needed. The correct one is the Preference folder in the Users home folder.
    The same folder appearing after restarting is related to the Finder, so move the file named com.apple.finder.plist to the Desktop and restart. If that helps preventing the same folder appearing, you will need to reset all your Finder preferences. If not, you can return the old .plist file from the Desktop back to the Preferences folder and will need to look for another solution.
    - Many applications I notice do not "remember" the last settings changed/used, always reverting to the "pre-crash" setting. Notable examples:
    - iChat settings (buddy icon, status, etc.) must ALWAYS be manually adjusted when I open iChat now.
    - iTunes and iPhoto are a big drag to open, because I must always "find" my libraries. They have long been moved to an external drive, but these iApps always ask me to locate them or create new ones. Even if I attempt to change my preferences.
    - Dock: the settings/icons revert back to the "pre-crash" version, and since I have updated many Apps, several icons show the Question Mark symbol, as some old Apps are long gone.
    Each of the above has its own .plist file(s) in the above named Preferences folder.
    It’s probably best to quit the applications before removing the preferences. Try moving the main .plist files, i.e., com.apple.iChat.plist to the desktop and restart iChat. If it doesn’t help, remove the other .plist files related to iChat. They will be replaced by the system. Some newly created .plist files don’t function until after a restart (like the Finder one described above). I don’t think iChat, iTunes, etc., require a restart, but it couldn’t hurt. If this helped with iChat, do the same procedure for iTunes, Dock, and any others giving you problems.
    If these do not help, you may need to consider an Archive & Install.
    I tried Disk Utility, repairing permissions. It recognized many inconsistencies and problems,
    but the repairs never seem to "stick."
    As long as the permissions inconsistencies include “Permissions differ,” SUID or ACL warnings, you can probably safely ignore them. But there is a .plist file for DiskUtility as well, which you may want to replace by moving it to the Desktop and restarting. If at the end of Repair Permissions it says “Permission Repair Complete,” it’s probably okay.
    Again, this happens each time I restart/reboot.
    So if I only put my MacBook to sleep mode, it does fine when it wakes up,
    and remembers desktop settings, iChat settings, etc.
    Therefore, I only rarely shut down now, to avoid my Groundhog's Day syndrome.
    This is annoying. Help Me. Someone. Please.
    Here’s hoping for an UNGroundhog’s Day.

  • Essbase Variable with more than a value for use after in Planning forms.

    I want to now if it would be possible to create a variable with more than a value for use after in Planning forms.
    The variable that I want to use is created in Essbase.
    Example:
    &Years = FY08,FY09,FY10

    Hi.
    The only workaround I know for the problem is to create parent in the dimension.
    In your case, create member “planyears”.
    Then you define children that are shard (this are the multiple member for the variables FY08, FY09 etc..)
    Create Essbase sub variable that will have 1 member value “planyears”
    When you use the Sub Variable in form select function “Children” and in that case it will use the member FY08,FY09 etc on the form.
    Limitation: I’m working on version 9.2.0.3 so you can’t create hierarchy in the year dimension, but you can use it in other dimension.
    AE

  • I just set an administrators name (my full name) and password for parental controls (using the one I always use) and now after restarting and trying to make changes to aprental controls it does not recognize my password

    I just set an administrators name (my full name) and password for parental controls (using the one I always use) and now after restarting and trying to make changes to aprental controls it does not recognize my password

    Hello, do you have another admin account to log into for a test?

  • While searching for a photo, my Mac  went into endless loop, so had to shut it down using button. After restart,  highlightrd text looked "different." Also unable to  highlight layers in Photoshop.

    I was searching for a photo on myiMac when it went into an endless loop. Only way I could think of to stop was using the button at the back of my computer.  After restart, had to erase  text in Appleworks one character at a time, because  highlighter did  not work properly; also  looked "different: when typing  on an internet website . ..and was unable to highlight  layers  (in Photoshop). What did I do wrong? and How can I correct it? PS: Also unable to edit my system. (Am only using  my iMac Intel these days, with OS X.4.11)

    Anybody able to help me out with this one? West coast, you awake yet?

  • How can I use "undone" after restarting my PC?

    I did something stupid in iTunes (no songs are marked anymore).  How can I reset it after restarting the Pc?
    Thanx

    Hi there
    Captivate simply records what appears on your computer screen. So the trick is getting the iPad to display on your PC screen. There is an applicaton called Reflector that should allow this.
    http://www.airsquirrels.com/reflector/
    Cheers... Rick

  • File adapter: file_name with counter, stable after restart J2EE

    Hello guys,
    we are on XI 7.0.
    in a receiver file channel we have to create file names with a stable counter (7digits).
    The payload is IDOC flat file after ABAP mapping (not XML format).
    The  bad thing with the counter is that it is not stable. After restart of J2EE engine the counter starts again more or less
    from the beginning (also described in a FAQ OSS note).
    Does anybody have an idea how we could realize a stable counter for file names that also increases the counter after restart of J2EE. Is individual programming necessary? module ?
    We thought about SAP number ranges (DB) but how to integrate this in the file channel. Also generating the the number in ERP and send it in the IDOC to XI, but after the ABAP mapping to IDOC flat file we cannot use the payload for variable replacement.
    Every help is appreciated
    best regards
    Hans

    Hello Georg,
    You can achieve this by developing a Customized adapter module,
    Try to maintain the counter in one of the temporary file in the XI system, read the counter number from the temporary file and increment the counter by 1.
    rename the receiver filename with the sufix as counter.
    replace the counter number in the temporary file with the latest counter number i.e increment by '1'.
    regards,
    Chandra Shekhar

  • Indesign CS6 quits during document recovery, even after restart. How do I get out of this cycle?

    Indesign CS6 quits during document recovery, even after restart. How do I get out of this cycle?
    I was saving a document when it originally quit. so "locked" file appeared in directory as well as reg file.
    Upon restart of InDesign, recovery failed and software quit again.
    Restarted computer, then indesign, file opens but as soon as I select "recover" it sends a message that indesign needs to close.
    I cannot seem to get out of this cycle. Help.

    Use your operating system’s Search utility to find a folder called (InDesign Recovery) and delete it.

  • IChat windows loose data after restart

    Hello,
    If one keeps a series of ichats open and shuts down ichat and restarts the computer, after restarting ichat the windows are still open but know have a question bubble with the name of the person previously ichated with.
    using 10.6
    under a previous version (10.5?), after a restart the windows reopened but with the ichats still showing. How do we get back this behavior?

    Hi,
    In iChat 4 you had "Remember Open Chats across Launch" which displayed the last chats you had.
    In IChat 5 you have a different setting linked to Save Transcripts.
    Save Transcripts has to be On.
    You can then set to Display a certain number of Chats.
    This does not replicate the Remember Open Chats.
    Last Chat when a Buddy is also clicked in the Buddy List will display the last chat you had with them.
    The Last 25 Chats option (as with other of the numbers) will display the last chosen number of IMs from that chat (Or the last chat of another selected Buddy)
    (Returning to Last Chat then only displays the Last IM).
    Now as iChat 5 is a new version the .plist is rewritten the first time.
    This has a direct effect on the Last Chat options.
    The .plist is now missing some info about the Last Chats although it can search and display the Last Chat with a Buddy if a Buddy is clicked.
    It seems to get better as time goes on about displaying Open chats on Quit like the previous version if left at Show Last Chat rather than one of the numbered choices.
    Another way to explain it.
    In the File Menu of iChat you have Recent Items.
    This lists the last Text Chats and Video or Audio chats you had and Saved Chats
    (The Number of items displayed here is set in System Preferences > Appearance > Number of Documents)
    It seems that there is a correlation between th Recent Items and the Saved Chats and the Last Chat has to be in both to replicate the "Remember Open Chats across Launch"
    It is not a perfect match for the previous setting.
    It does seem to improve.
    Having said that I played and tweaked mine running though all the option I could think off and then left it for a while.
    Now mine seems to remember the Last Open Chat properly. (I may have beaten it in to submission)
    10:15 PM Friday; May 21, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

Maybe you are looking for

  • How can I sync contacts from Outlook 2010 to my iPhone 4S without using iCloud?

    How can I sync contacts form Outlook 2010 to my iPhone 4S without using iCloud?

  • While Loop - Object Creation

    Hello, I have a question on object creation and while loops. Have a look at the following code snippet: while(true)        Object obj = new Object();        // Pass off obj to a new thread        Thread job = new Thread(new ObjectHandler(obj));      

  • Problem with Trinidad skinning

    Hi, I'm a new Trinidad user and I'm unable to get the skinning to work. Maybe I did something wrong or forgot something. Trinidad tags are displayed in the webpage (but not skinned). I installed the skin "beach" from the demo, adding a block that wou

  • Thunderbolt display output distorted

    Working on MBP 2.4 Ghz, i5, 8GB OSX 10.9.4 When connecting via DisplayPort-cable to my Thunderbolt port towards a external TV (Philips 40") I see a nice mirrored image(see image 2). However, after some time (random) I receive a distorted image on my

  • Imac synchronization video/sound with airport

    Hi all, I just acquired an Imac and an airport express. My aiport express is conneected to my amplifier and my broadband.   On the Imac, when I play a video, the image is not synchronize with the music !! there are 2-3 sec difference. Did anyone expe