├── .gitattributes ├── .gitignore ├── README.md ├── ScriptGalleryISEAddOn ├── LoadScriptGalleryISEAddOn.ps1 ├── ScriptGalleryISEAddOn.sln ├── ScriptGalleryISEAddOn.v11.suo └── ScriptGalleryISEAddOn │ ├── LoadScriptGalleryISEAddOn.ps1 │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── ScriptGalleryISEAddOn.csproj │ ├── ScriptGalleryISEAddOn.csproj.user │ ├── UserControl1.xaml │ ├── UserControl1.xaml.cs │ ├── bin │ └── Debug │ │ ├── LoadScriptGalleryISEAddOn.ps1 │ │ ├── Microsoft.Windows.Shell.dll │ │ ├── Microsoft.Windows.Shell.pdb │ │ ├── Microsoft.Windows.Shell.xml │ │ ├── ScriptGalleryISEAddOn.dll │ │ ├── ScriptGalleryISEAddOn.pdb │ │ ├── ribboncontrolslibrary.dll │ │ ├── ribboncontrolslibrary.pdb │ │ └── ribboncontrolslibrary.xml │ └── obj │ └── Debug │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── ScriptGalleryISEAddOn.Properties.Resources.resources │ ├── ScriptGalleryISEAddOn.csproj.FileListAbsolute.txt │ ├── ScriptGalleryISEAddOn.csproj.GenerateResource.Cache │ ├── ScriptGalleryISEAddOn.csprojResolveAssemblyReference.cache │ ├── ScriptGalleryISEAddOn.dll │ ├── ScriptGalleryISEAddOn.g.resources │ ├── ScriptGalleryISEAddOn.pdb │ ├── ScriptGalleryISEAddOn_MarkupCompile.cache │ ├── ScriptGalleryISEAddOn_MarkupCompile.i.cache │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ ├── UserControl1.baml │ ├── UserControl1.g.cs │ └── UserControl1.g.i.cs └── TODO.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # ========================= 18 | # Operating System Files 19 | # ========================= 20 | 21 | # OSX 22 | # ========================= 23 | 24 | .DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must ends with two \r. 29 | Icon 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ScriptGalleryISEAddOn 2 | ===================== 3 | 4 | Initial version of PowerShell Script Gallery ISE AddOn 5 | 6 | This is a first attempt in creating a PowerShell ISE Add-On for uploading scripts to the TechNet Gallery. 7 | http://gallery.technet.microsoft.com/ 8 | 9 | Add-On is using a "simple" browser object. 10 | 11 | ![Image](https://bqechw.dm2302.livefilestore.com/y2pVvMvdIcR8T0TN9jlEdl0Hzv15aPVqTbnUjgQHRgrVUW0jFROVxH9NWhDn0uBSDEZ96FS7yzdtx7vS1fPJ0H3Kqfz02bmyQ8eGoIh4wrMfRc/ScriptGalleryUpload.jpg) 12 | 13 | Check out the video on how to use the PowerShell Script Gallery Upload ISE on here: 14 | http://youtu.be/4MKYtG8fWFo 15 | 16 | /Stefan 17 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/LoadScriptGalleryISEAddOn.ps1: -------------------------------------------------------------------------------- 1 | add-type -path "C:\Users\stefstr\Documents\GitHub\PowerShell\ScriptGalleryISEAddOn\ScriptGalleryISEAddOn\ScriptGalleryISEAddOn\bin\Debug\ScriptGalleryISEAddOn.dll" 2 | 3 | $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('ScriptGalleryUpload', [ScriptGalleryISEAddOn.ScriptGallery], $true) 4 | 5 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptGalleryISEAddOn", "ScriptGalleryISEAddOn\ScriptGalleryISEAddOn.csproj", "{E6D508FA-0F95-476D-A9B3-A60AA3FE305F}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {E6D508FA-0F95-476D-A9B3-A60AA3FE305F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {E6D508FA-0F95-476D-A9B3-A60AA3FE305F}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {E6D508FA-0F95-476D-A9B3-A60AA3FE305F}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {E6D508FA-0F95-476D-A9B3-A60AA3FE305F}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stefanstranger/ScriptGalleryISEAddOn/c8ba33d43c320d12c7f7e2c5d9629e82a542b7c1/ScriptGalleryISEAddOn/ScriptGalleryISEAddOn.v11.suo -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/LoadScriptGalleryISEAddOn.ps1: -------------------------------------------------------------------------------- 1 | # --------------------------------------------------- 2 | # Script: C:\Users\stefstr\Documents\GitHub\PowerShell\ScriptGalleryISEAddOn\ScriptGalleryISEAddOn\ScriptGalleryISEAddOn\bin\Debug\LoadScriptGalleryISEAddOn.ps1 3 | # Version: 0.1 4 | # Author: Stefan Stranger 5 | # Date: 07/18/2014 17:04:10 6 | # Description: 7 | # Comments: 8 | # --------------------------------------------------- 9 | 10 | add-type -path "C:\Users\stefstr\Documents\GitHub\PowerShell\ScriptGalleryISEAddOn\ScriptGalleryISEAddOn\ScriptGalleryISEAddOn\bin\Debug\ScriptGalleryISEAddOn.dll" 11 | 12 | $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('ScriptGalleryUpload', [ScriptGalleryISEAddOn.ScriptGallery], $true) 13 | 14 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("ScriptGalleryISEAddOn")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ScriptGalleryISEAddOn")] 15 | [assembly: AssemblyCopyright("Copyright © 2014")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly:ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ScriptGalleryISEAddOn.Properties { 12 | 13 | 14 | /// 15 | /// A strongly-typed resource class, for looking up localized strings, etc. 16 | /// 17 | // This class was auto-generated by the StronglyTypedResourceBuilder 18 | // class via a tool like ResGen or Visual Studio. 19 | // To add or remove a member, edit your .ResX file then rerun ResGen 20 | // with the /str option, or rebuild your VS project. 21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 24 | internal class Resources { 25 | 26 | private static global::System.Resources.ResourceManager resourceMan; 27 | 28 | private static global::System.Globalization.CultureInfo resourceCulture; 29 | 30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 31 | internal Resources() { 32 | } 33 | 34 | /// 35 | /// Returns the cached ResourceManager instance used by this class. 36 | /// 37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 38 | internal static global::System.Resources.ResourceManager ResourceManager { 39 | get { 40 | if ((resourceMan == null)) { 41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ScriptGalleryISEAddOn.Properties.Resources", typeof(Resources).Assembly); 42 | resourceMan = temp; 43 | } 44 | return resourceMan; 45 | } 46 | } 47 | 48 | /// 49 | /// Overrides the current thread's CurrentUICulture property for all 50 | /// resource lookups using this strongly typed resource class. 51 | /// 52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 53 | internal static global::System.Globalization.CultureInfo Culture { 54 | get { 55 | return resourceCulture; 56 | } 57 | set { 58 | resourceCulture = value; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ScriptGalleryISEAddOn.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/ScriptGalleryISEAddOn.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E6D508FA-0F95-476D-A9B3-A60AA3FE305F} 8 | library 9 | Properties 10 | ScriptGalleryISEAddOn 11 | ScriptGalleryISEAddOn 12 | v4.5 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | ..\..\..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.PowerShell.GPowerShell\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.GPowerShell.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 4.0 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | MSBuild:Compile 60 | Designer 61 | 62 | 63 | UserControl1.xaml 64 | Code 65 | 66 | 67 | 68 | 69 | Code 70 | 71 | 72 | True 73 | True 74 | Resources.resx 75 | 76 | 77 | True 78 | Settings.settings 79 | True 80 | 81 | 82 | ResXFileCodeGenerator 83 | Resources.Designer.cs 84 | 85 | 86 | Always 87 | 88 | 89 | SettingsSingleFileGenerator 90 | Settings.Designer.cs 91 | 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/ScriptGalleryISEAddOn.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Program 5 | C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe 6 | LoadScriptGalleryISEAddOn.ps1 7 | 8 | 9 | -------------------------------------------------------------------------------- /ScriptGalleryISEAddOn/ScriptGalleryISEAddOn/UserControl1.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 |