Tag: Export

Last updated by at .

CLIXML Export Import

Save PowerShell Object to file for Remote Troubleshooting

This is not something new to the most of you PowerShell guys out there, but still there are a lot of IT Pros which do not know about this. Sometimes we have to do some remote troubleshooting without having access to the system itself. The thing you can do is to let the customer send you some screenshots but that doesn’t really show everything and maybe you have to contact the customer like 100 times to get the right information. A better solution is to let the customer to run a PowerShell command or script and send you the output. But even a text file or screenshot of the PowerShell output is not the best solution. If you get a lot of text in a TXT file it is hard to sort it and maybe there are some information missing because the txt output does not include all information of the PowerShell object.

I have started to use a simple method to export PowerShell objects to a XML file and import the object on another system. This can be done by the PowerShell cmdlets Export-Clixml and Import-Clixml.

What I do is, I tell the customer to run the following command to generate a XML with the PowerShell objects about his disks for example.

After I got this XML file, I can import it here on my local system and can work with it as I would be in front of the customer system.

CLIXML Export Import

As I said, this is nothing new but this can save you and your customer some time. Of course this works with other objects not just disks 😉 For example you can get Cluster Configurations, Hyper-V Virtual Switch Configurations and much more.

Update:

Jeffrey P Snover (Microsoft Technical Fellow and Lead Architect of Windows Server) commented on my blog post and had some great input. If you want to troubleshoot sometimes you often need more information than just one information. To save multiple PowerShell objects into a single file you can use a hashtable to do this:

You can see more information on this topic in Jeffery Snovers comment on this blog.

 



Export Templates from Virtual Machine Manager Settings

Export and Import Virtual Machine Manager Templates

If you are working with System Center Virtual Machine Manager and you want to export and import your existing VM or Service Templates. I have a customer scenario where we have two VMM installations. They are using System Center Virtual Machine Manager, Orchestrator, Serivce Manager to deploy new customer environments for their premium SaaS (Software as a Service) hosting solution where they deploy Lync, Exchange and SharePoint fully automated. Here we have a development environment where they test new System Center Orchestrator Runbooks and new Templates in Virtual Machine Manager. After they have a working RunBook with working Templates they export the templates from the dev VMM and import them in the production environment.
Because I was surprise how great this works and I think not a lot of people know about this feature, I created this short step-by-step guide.

Export Templates from Virtual Machine Manager

First select the Templates you want to export and click on the Export button on the Ribbon bar. You can also do a multiple select to export multiple templates.

Export Templates from Virtual Machine Manager

You can than configure the export, with a location, password.

Export Templates from Virtual Machine Manager Settings

 

You can also select what physical resources which should be exported with the template. For example if you are using the same VHD or VHDX for multiple templates you may want to export this resource only once to save some space.

Export Templates from Virtual Machine Manager physical resources

The export will look kind of like this. The XML files are the templates with the configurations, and in the folders are the physical resources like VHDs, XMLs or other stuff.

Exported Templates from Virtual Machine Manager

Import Templates in Virtual Machine Manager

To import a template just select the exported XML file.

Import Templates in Virtual Machine Manager

You can change or setup the resource of the template, for example you can select an already existing VHD from your Library or an already existing Run As account.

Import Templates in Virtual Machine Manager resources

And you can set the location for the new imported resources (VHDs,…)

Import Templates in Virtual Machine Manager resource location

I hope this shows you how easy an export and import of a Service or VM Template from System Center Virtual Machine Manager is. I like especially how SCVMM handles the additional resources, so you don’t have to import the same VHD every time and you can change Run As accounts very easily.

 

 



Powershell: How to export Windows Eventlogs with Powershell

Powershell Header

This is a little dirty Windows Powershell script which exports or backups Windows Eventlogs. The script creates a .evt file which can be used with the Windows Eventlog Viewer.

And with the next code it cleans up older exported Eventlogs.

UPDATE: If you wanna clean the Eventlog after the export you can do that by using the Clear-Eventlog cmdlet. (Thanks to Michel from server-talk.eu)

And here the whole “script”



Import Evernote notes to OneNote 2010

Microsoft OneNote 2010Since I work more and more with Windows 7 I had a look at Microsoft OneNote 2010. Before I used Evernote and I was happy with it. But as I saw OneNote and startet using it, I can’t think being without it. There are alot of features I really love and OneNote 2010 is really nice integrated into Windows 7 and the Office products.

So if you wish to migrate from Evernote to Microsoft OneNote 2010 you can do that in diffrend ways.

  • Import Notes via Outlook (send Evernote Notes via email and import them in Outlook via the Send to OneNote button)
  • Export Notes as HTML and Import Them Into OneNote
  • Import Notes via the OneNote Printer

You can read a great HowTo on howtogeek.com

Btw. Microsoft released also OneNote for iPhone



Sharepoint 2007 or WSS 3.0 export/import

How to do a Sharepoint site export:

  • stsadm -o export -url http://sharepointsite -filename c:\backup\sharepointsite.bak -includeusersecurity -versions 4 -nofilecompression

Hot to do a Sharepoint site import:

  • stsadm –o import –url http://sharepointsite -filename c:\backup\sharepointsite.bak –includeusersecurity

More information to stsadm: