├── .gitattributes ├── .gitignore ├── About the Windows 7 Resource Kit PowerShell Pack.docx ├── Add-on.ModuleManagement ├── Add-on.ModuleManagement.psd1 ├── Add-on.ModuleManagement.psm1 └── Resources │ ├── ConvertToModule.ico │ ├── NewManifest.ico │ └── NewModule.ico ├── Add-on.ScriptEditorEssentials ├── Add-on.ScriptEditorEssentials.psd1 ├── Add-on.ScriptEditorEssentials.psm1 └── Resources │ ├── ClearPowerShellConsole.ico │ ├── DecreaseIndent.ico │ ├── IncreaseIndent.ico │ ├── ViewWhiteSpace.ico │ └── WordWrap.ico ├── Add-on.SnippetManager ├── Add-on.SnippetManager.psd1 ├── Add-on.SnippetManager.psm1 ├── Resources │ └── ico │ │ ├── 0.ico │ │ ├── 1.ico │ │ ├── 10.ico │ │ ├── 2.ico │ │ ├── 3.ico │ │ ├── 4.ico │ │ ├── 5.ico │ │ ├── 6.ico │ │ ├── 7.ico │ │ ├── 8.ico │ │ ├── 9.ico │ │ ├── SearchB.ico │ │ ├── barRED.jpg │ │ ├── bargreen.jpg │ │ ├── barwhite.jpg │ │ ├── baryellow.jpg │ │ ├── box.jpg │ │ ├── folder.ico │ │ ├── folderPGpath.ico │ │ ├── foundsnippet.ico │ │ ├── logoII_129x72_s.jpg │ │ ├── menubar.jpg │ │ ├── root-NA.ico │ │ ├── root-PGuse.ico │ │ ├── root-readonly.ico │ │ ├── root.ico │ │ ├── rootroot.ico │ │ ├── search-nores.ico │ │ ├── snippet-NotActive.ico │ │ ├── snippet.ico │ │ ├── snippeticonPG.ico │ │ └── windowicon.ico ├── SnipMan.ps1 ├── Snipman_rm.ps1 └── Snipman_updater.ps1 ├── DotNet ├── DotNet.psm1 ├── Get-CommandWithParameterType.ps1 ├── Get-ProgID.ps1 └── Get-Type.ps1 ├── EZOut ├── Add-FormatData.ps1 ├── Add-TypeData.ps1 ├── Assets │ ├── EzOut_Small.png │ ├── EzOut_Splash.png │ ├── EzOut_Store.png │ ├── EzOut_Tile.png │ ├── EzOut_Wide.png │ └── f_logo.png ├── Clear-FormatData.ps1 ├── Clear-TypeData.ps1 ├── ConvertTo-PropertySet.ps1 ├── ConvertTo-TypePropertySet.ps1 ├── EZOut.Pipeworks.psd1 ├── EZOut.psd1 ├── EZOut.psm1 ├── Find-FormatView.ps1 ├── Get-FormatFile.ps1 ├── Get-PropertySet.ps1 ├── New-EZFormatFile.ps1 ├── Out-FormatData.ps1 ├── Out-TypeData.ps1 ├── Remove-FormatData.ps1 ├── Remove-TypeData.ps1 ├── Show-CustomAction.ps1 ├── Write-CommandOverload.ps1 ├── Write-CustomAction.ps1 ├── Write-FormatTableView.ps1 ├── Write-FormatView.ps1 ├── Write-PowerShellHashtable.ps1 ├── Write-PropertySet.ps1 ├── Write-TypeView.ps1 ├── css │ └── custom-theme │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_55_fbf9ee_40x100.png │ │ ├── ui-bg_flat_66_f2890c_40x100.png │ │ ├── ui-bg_flat_75_f2890c_40x100.png │ │ ├── ui-bg_flat_75_fafafa_40x100.png │ │ ├── ui-bg_flat_90_fafafa_40x100.png │ │ ├── ui-bg_flat_95_fef1ec_40x100.png │ │ ├── ui-icons_f2890c_256x240.png │ │ └── ui-icons_fafafa_256x240.png │ │ ├── jquery-ui-1.9.1.custom.css │ │ └── jquery-ui-1.9.1.custom.min.css ├── en-us │ ├── Creating_A_New_View.walkthru.help.txt │ ├── Creating_Colorized_Format_With_Custom_Actions.walkthru.help.txt │ ├── Getting_Started_With_Table_Views.walkthru.help.txt │ ├── Improving_How_Xml_Looks_In_PowerShell.walkthru.help.txt │ ├── Making_Select-Object_Simpler_with_PropertySets.walkthru.help.txt │ └── about_EZOut.help.txt └── js │ ├── jquery-1.8.2.js │ ├── jquery-ui-1.9.1.custom.js │ └── jquery-ui-1.9.1.custom.min.js ├── FileSystem ├── Copy-ToZip.ps1 ├── FileSystem.psd1 ├── FileSystem.psm1 ├── Get-DuplicateFile.ps1 ├── Get-FreeDiskSpace.ps1 ├── Get-SHA1.ps1 ├── Mount-SpecialFolder.ps1 ├── New-Zip.ps1 ├── Rename-Drive.ps1 ├── Resolve-ShortcutFile.ps1 ├── Start-FileSystemWatcher.ps1 └── en-us │ ├── about_FileSystem_Module.help.txt │ └── about_FileSystem_Readme.help.txt ├── GMI-SQL ├── GMI-SQL.psd1 └── GMI-SQL.psm1 ├── HSGWMImoduleV6 └── HSGWMImoduleV6.psm1 ├── HyperV ├── En-us.ps1 ├── Helper.ps1 ├── HyperV.psd1 ├── MAML-VMNetwork.XML ├── MAML-VMSnapshot.XML ├── Maml-Helper.XML ├── Network.ps1 ├── SnapShot.ps1 ├── VMConfig.ps1 ├── disk.ps1 ├── hyperv.format.ps1xml ├── maml-vm.xml ├── maml-vmDisk.xml ├── maml-vmconfig.xml ├── menu.ps1 ├── v1Compatability.ps1 └── vm.ps1 ├── LogHelper ├── LogHelper.psd1 └── LogHelper.psm1 ├── MyTools └── MyTools.psm1 ├── NetShell ├── NetShell.psd1 └── NetShell.psm1 ├── NetworkScan ├── NetworkScan.psd1 └── NetworkScan.psm1 ├── OrchestratorServieModule ├── OrchWebService.pptx ├── OrchestratorServiceModule.psm1 ├── Test-GetCollection.ps1 ├── Test-GetInstance.ps1 ├── Test-GetInstanceDetails.ps1 ├── Test-GetJob.ps1 ├── Test-GetRunbook.ps1 ├── Test-StartRunbook.ps1 ├── Test-StartRunbookAndGetInstanceDetails.ps1 └── Test-StopJob.ps1 ├── PSDiagnostics ├── Construct-PSRemoteDataObject.ps1 └── psdiagdemo.ps1 ├── PSFTP ├── Add-FTPItem.ps1 ├── Get-FTPChildItem.ps1 ├── Get-FTPItem.ps1 ├── Get-FTPItemSize.ps1 ├── New-FTPItem.ps1 ├── PSFTP.Format.ps1xml ├── PSFTP.psd1 ├── PSFTP.psm1 ├── Remove-FTPItem.ps1 ├── Rename-FTPItem.ps1 └── Set-FTPConnection.ps1 ├── PSImageTools ├── Add-CropFilter.ps1 ├── Add-OverlayFilter.ps1 ├── Add-RotateFlipFilter.ps1 ├── Add-ScaleFilter.ps1 ├── Background.png ├── ConvertTo-Bitmap.ps1 ├── ConvertTo-Jpeg.ps1 ├── Copy-ImageIntoOrganizedFolder.ps1 ├── En-US │ ├── about_PSImageTools_Module.help.txt │ └── about_PSImageTools_Readme.help.txt ├── Example │ ├── FilterImagesInDirectory.ps1 │ └── SortByCamera.ps1 ├── FilterImagesInDirectory.ps1 ├── Get-Image.ps1 ├── Get-ImageProperty.ps1 ├── PSImageTools.psd1 ├── PSImageTools.psm1 └── Set-ImageFilter.ps1 ├── PSRSS ├── En-Us │ ├── about_PSRSS_Module.help.txt │ └── about_PSRSS_Readme.help.txt ├── Get-Article.ps1 ├── Get-Feed.ps1 ├── New-Feed.ps1 ├── PSRSS.psd1 ├── PSRSS.psm1 ├── Read-Article.ps1 ├── Remove-Article.ps1 └── Remove-Feed.ps1 ├── PSRemoteRegistry ├── Get-RegBinary.ps1 ├── Get-RegDWord.ps1 ├── Get-RegDefault.ps1 ├── Get-RegExpandString.ps1 ├── Get-RegKey.ps1 ├── Get-RegMultiString.ps1 ├── Get-RegQWord.ps1 ├── Get-RegString.ps1 ├── Get-RegValue.ps1 ├── New-RegKey.ps1 ├── PSFanatic.PSRemoteRegistry.Format.ps1xml ├── PSRemoteRegistry.ico ├── PSRemoteRegistry.png ├── PSRemoteRegistry.psd1 ├── PSRemoteRegistry.psm1 ├── Remove-RegKey.ps1 ├── Remove-RegValue.ps1 ├── Set-RegBinary.ps1 ├── Set-RegDWord.ps1 ├── Set-RegDefault.ps1 ├── Set-RegExpandString.ps1 ├── Set-RegMultiString.ps1 ├── Set-RegQWord.ps1 ├── Set-RegString.ps1 ├── Test-RegKey.ps1 ├── Test-RegValue.ps1 └── en-US │ └── about_PSRemoteRegistry_Module.help.txt ├── PSSystemTools ├── Get-BootStatus.ps1 ├── Get-DisplaySetting.ps1 ├── Get-Font.ps1 ├── Get-LogicalDiskInventory.ps1 ├── Get-MultiTouchMaximum.ps1 ├── Get-OSVersion.ps1 ├── Get-Processor.ps1 ├── Get-SystemFont.ps1 ├── Get-USB.ps1 ├── Get-WindowsEdition.ps1 ├── Import-IniFile.ps1 ├── PSSystemTools.psd1 ├── PSSystemTools.psm1 ├── Test-32Bit.ps1 ├── Test-64Bit.ps1 └── en-us │ ├── about_PSSystemTools_Readme.help.txt │ └── about_System_Module.help.txt ├── PSUserTools ├── En-US │ ├── about_PSUserTools_Module.help.txt │ └── about_PSUserTools_Readme.help.txt ├── Get-CurrentUser.ps1 ├── Get-Everyone.ps1 ├── PSUserTools.psd1 ├── PSUserTools.psm1 ├── Start-ProcessAsAdministrator.ps1 └── Test-IsAdministrator.ps1 ├── PSWindowsUpdate ├── Add-WUOfflineSync.ps1 ├── Add-WUServiceManager.ps1 ├── Get-WUHistory.ps1 ├── Get-WUInstall.ps1 ├── Get-WUInstallerStatus.ps1 ├── Get-WUList.ps1 ├── Get-WURebootStatus.ps1 ├── Get-WUServiceManager.ps1 ├── Get-WUUninstall.ps1 ├── Hide-WUUpdate.ps1 ├── Invoke-WUInstall.ps1 ├── PSWindowsUpdate.Format.ps1xml ├── PSWindowsUpdate.psd1 ├── PSWindowsUpdate.psm1 ├── Remove-WUOfflineSync.ps1 ├── Remove-WUServiceManager.ps1 └── Update-WUModule.ps1 ├── PTSManageISE ├── Get-ISEMRUList.ps1 ├── Get-ISESetting.ps1 ├── PTSManageISE.psd1 ├── PTSManageISE.psm1 ├── Set-ISEMRUList.ps1 └── Set-ISESetting.ps1 └── Pipeworks ├── Add-AzureLocalResource.ps1 ├── Add-AzureRole.ps1 ├── Add-AzureSetting.ps1 ├── Add-AzureStartupTask.ps1 ├── Add-AzureWebSite.ps1 ├── Add-EC2.ps1 ├── Add-SQLTable.ps1 ├── Add-SecureSetting.ps1 └── Assets └── Pipeworks_48.png /.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 | -------------------------------------------------------------------------------- /About the Windows 7 Resource Kit PowerShell Pack.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/About the Windows 7 Resource Kit PowerShell Pack.docx -------------------------------------------------------------------------------- /Add-on.ModuleManagement/Add-on.ModuleManagement.psd1: -------------------------------------------------------------------------------- 1 | ####################################################################################################################### 2 | # File: Add-on.ModuleManagement.psd1 # 3 | # Author: Kirk Munro # 4 | # Publisher: Quest Software, Inc. # 5 | # Copyright: © 2010 Quest Software, Inc. All rights reserved. # 6 | # Usage: To load this module in your Script Editor: # 7 | # 1. Open the Script Editor. # 8 | # 2. Select "PowerShell Libraries" from the File menu. # 9 | # 3. Check the Add-on.ModuleManagement module. # 10 | # 4. Click on OK to close the "PowerShell Libraries" dialog. # 11 | # Alternatively you can load the module from the embedded console by invoking this command: # 12 | # Import-Module -Name Add-on.ModuleManagement # 13 | # Please provide feedback on the PowerGUI Forums. # 14 | ####################################################################################################################### 15 | 16 | @{ 17 | 18 | # Script module or binary module file associated with this manifest 19 | ModuleToProcess = 'Add-on.ModuleManagement.psm1' 20 | 21 | # Version number of this module. 22 | ModuleVersion = '1.0.0.1' 23 | 24 | # ID used to uniquely identify this module 25 | GUID = '{50ed9d45-0514-41c0-8d58-4bbba3313d28}' 26 | 27 | # Author of this module 28 | Author = 'Kirk Munro' 29 | 30 | # Company or vendor of this module 31 | CompanyName = 'Quest Software, Inc.' 32 | 33 | # Copyright statement for this module 34 | Copyright = '© 2011 Quest Software, Inc. All rights reserved.' 35 | 36 | # Description of the functionality provided by this module 37 | Description = 'A Script Editor Add-on that provides useful module management capabilities.' 38 | 39 | # Minimum version of the Windows PowerShell engine required by this module 40 | PowerShellVersion = '2.0' 41 | 42 | # Name of the Windows PowerShell host required by this module 43 | <# Commented out due to a bug 44 | PowerShellHostName = 'PowerGUIScriptEditor' 45 | #> 46 | 47 | # Minimum version of the Windows PowerShell host required by this module 48 | <# Commented out due to a bug 49 | PowerShellHostVersion = '2.1.1.1202' 50 | #> 51 | 52 | # Minimum version of the .NET Framework required by this module 53 | DotNetFrameworkVersion = '2.0' 54 | 55 | # Minimum version of the common language runtime (CLR) required by this module 56 | CLRVersion = '2.0.50727' 57 | 58 | # Processor architecture (None, X86, Amd64, IA64) required by this module 59 | ProcessorArchitecture = 'None' 60 | 61 | # Modules that must be imported into the global environment prior to importing 62 | # this module 63 | RequiredModules = @() 64 | 65 | # Assemblies that must be loaded prior to importing this module 66 | RequiredAssemblies = @() 67 | 68 | # Script files (.ps1) that are run in the caller's environment prior to 69 | # importing this module 70 | ScriptsToProcess = @() 71 | 72 | # Type files (.ps1xml) to be loaded when importing this module 73 | TypesToProcess = @() 74 | 75 | # Format files (.ps1xml) to be loaded when importing this module 76 | FormatsToProcess = @() 77 | 78 | # Modules to import as nested modules of the module specified in 79 | # ModuleToProcess 80 | NestedModules = @() 81 | 82 | # Functions to export from this module 83 | FunctionsToExport = '*' 84 | 85 | # Cmdlets to export from this module 86 | CmdletsToExport = '*' 87 | 88 | # Variables to export from this module 89 | VariablesToExport = '*' 90 | 91 | # Aliases to export from this module 92 | AliasesToExport = '*' 93 | 94 | # List of all modules packaged with this module 95 | ModuleList = @() 96 | 97 | # List of all files packaged with this module 98 | FileList = @( 99 | '.\Add-on.ModuleManagement.psm1' 100 | '.\Add-on.ModuleManagement.psd1' 101 | '.\Resources\NewModule.ico' 102 | '.\Resources\NewManifest.ico' 103 | '.\Resources\ConvertToModule.ico' 104 | ) 105 | 106 | # Private data to pass to the module specified in ModuleToProcess 107 | PrivateData = '' 108 | 109 | } 110 | 111 | # SIG # Begin signature block 112 | # MIIOhgYJKoZIhvcNAQcCoIIOdzCCDnMCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB 113 | # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR 114 | # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQULoWkxJU9C8JXh0zRx/4Q9SbS 115 | # ZFqggguFMIIFczCCBFugAwIBAgIQVDMCUo2yXdJ9VuMdT5/s7jANBgkqhkiG9w0B 116 | # AQUFADCBtDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8w 117 | # HQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBv 118 | # ZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEuMCwG 119 | # A1UEAxMlVmVyaVNpZ24gQ2xhc3MgMyBDb2RlIFNpZ25pbmcgMjAxMCBDQTAeFw0x 120 | # MTAzMDMwMDAwMDBaFw0xNDAzMDIyMzU5NTlaMIG2MQswCQYDVQQGEwJVUzETMBEG 121 | # A1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLQWxpc28gVmllam8xHTAbBgNVBAoU 122 | # FFF1ZXN0IFNvZnR3YXJlLCBJbmMuMT4wPAYDVQQLEzVEaWdpdGFsIElEIENsYXNz 123 | # IDMgLSBNaWNyb3NvZnQgU29mdHdhcmUgVmFsaWRhdGlvbiB2MjEdMBsGA1UEAxQU 124 | # UXVlc3QgU29mdHdhcmUsIEluYy4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK 125 | # AoIBAQCZUApfRti5qDWpZJP9X7WliUx3W4I3DEZMNZ7N9XpYrzrvj+RZi8WwgH0Z 126 | # 8ylo0zqMwBcPfMH6BR64005alBJCP27JgrsxOKv5FI9e8cgQCmoQT8/gBByOHhlt 127 | # /hYBatlFB4uxIfvDtIkWrqtVdC92aqtVVP+yCQVRkWiYfo6OfNYcoGTqIIrSTwfS 128 | # XMd21pFnFO1wButj0AcfSoIGcK1UGNpdg3D5cYOs9mv5KTHaIz4JXVL1xAscRwZi 129 | # SqKbM7Xc9VMOM4FJYYt4JrosM7BXIzk3ZGtvyIfXbs4UXxC/5Vr4exO04DsR4Rg7 130 | # RRZGT0RvjU2j40I82xpsoLGhR1qNAgMBAAGjggF7MIIBdzAJBgNVHRMEAjAAMA4G 131 | # A1UdDwEB/wQEAwIHgDBABgNVHR8EOTA3MDWgM6Axhi9odHRwOi8vY3NjMy0yMDEw 132 | # LWNybC52ZXJpc2lnbi5jb20vQ1NDMy0yMDEwLmNybDBEBgNVHSAEPTA7MDkGC2CG 133 | # SAGG+EUBBxcDMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNv 134 | # bS9ycGEwEwYDVR0lBAwwCgYIKwYBBQUHAwMwcQYIKwYBBQUHAQEEZTBjMCQGCCsG 135 | # AQUFBzABhhhodHRwOi8vb2NzcC52ZXJpc2lnbi5jb20wOwYIKwYBBQUHMAKGL2h0 136 | # dHA6Ly9jc2MzLTIwMTAtYWlhLnZlcmlzaWduLmNvbS9DU0MzLTIwMTAuY2VyMB8G 137 | # A1UdIwQYMBaAFM+Zqep7JvRLyY6P1/AFJu/j0qedMBEGCWCGSAGG+EIBAQQEAwIE 138 | # EDAWBgorBgEEAYI3AgEbBAgwBgEBAAEB/zANBgkqhkiG9w0BAQUFAAOCAQEAVoxv 139 | # js9TBh3o1cyZJMBqt5mHMjGPVsowHCfkzFyBoB85hOqZD7mU570h0Sr4wYUH+tgT 140 | # bDlgsJQzFhBoG23a67VPYy8c1lZeEq9Ix2qimk6BM3855B0rj3wn713wtO9gdDZK 141 | # jgJTP7TG0NBAczIR1f0kpvMe/IdyOuX0cY2AUiCeX7aad/q2BQ2fAhKvWASCqCSF 142 | # fkeF8NOo5PRYOlmls6FtlQ4P66qOX7srE584PAqlDoC/noUL7RCm9ZRABk00j0N6 143 | # wm4GnIeDKzs1sAaarHlYzlmXsPqvjSgU2rR4jHGZ49h3Ry+Qbxk8niK3E2L8LQQ0 144 | # w5ix9FsZ7G357XXZvTCCBgowggTyoAMCAQICEFIA5aolVvwahu2WydRLM8cwDQYJ 145 | # KoZIhvcNAQEFBQAwgcoxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwg 146 | # SW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMx 147 | # KGMpIDIwMDYgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s 148 | # eTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0 149 | # aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc1MB4XDTEwMDIwODAwMDAwMFoXDTIwMDIw 150 | # NzIzNTk1OVowgbQxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5j 151 | # LjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVy 152 | # bXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMTAx 153 | # LjAsBgNVBAMTJVZlcmlTaWduIENsYXNzIDMgQ29kZSBTaWduaW5nIDIwMTAgQ0Ew 154 | # ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD1I0tepdeKuzLp1Ff37+TH 155 | # Jn6tGZj+qJ19lPY2axDXdYEwfwRof8srdR7NHQiM32mUpzejnHuA4Jnh7jdNX847 156 | # FO6G1ND1JzW8JQs4p4xjnRejCKWrsPvNamKCTNUh2hvZ8eOEO4oqT4VbkAFPyad2 157 | # EH8nA3y+rn59wd35BbwbSJxp58CkPDxBAD7fluXF5JRx1lUBxwAmSkA8taEmqQyn 158 | # bYCOkCV7z78/HOsvlvrlh3fGtVayejtUMFMb32I0/x7R9FqTKIXlTBdOflv9pJOZ 159 | # f9/N76R17+8V9kfn+Bly2C40Gqa0p0x+vbtPDD1X8TDWpjaO1oB21xkupc1+NC2J 160 | # AgMBAAGjggH+MIIB+jASBgNVHRMBAf8ECDAGAQH/AgEAMHAGA1UdIARpMGcwZQYL 161 | # YIZIAYb4RQEHFwMwVjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24u 162 | # Y29tL2NwczAqBggrBgEFBQcCAjAeGhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20v 163 | # cnBhMA4GA1UdDwEB/wQEAwIBBjBtBggrBgEFBQcBDARhMF+hXaBbMFkwVzBVFglp 164 | # bWFnZS9naWYwITAfMAcGBSsOAwIaBBSP5dMahqyNjmvDz4Bq1EgYLHsZLjAlFiNo 165 | # dHRwOi8vbG9nby52ZXJpc2lnbi5jb20vdnNsb2dvLmdpZjA0BgNVHR8ELTArMCmg 166 | # J6AlhiNodHRwOi8vY3JsLnZlcmlzaWduLmNvbS9wY2EzLWc1LmNybDA0BggrBgEF 167 | # BQcBAQQoMCYwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTAd 168 | # BgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwMwKAYDVR0RBCEwH6QdMBsxGTAX 169 | # BgNVBAMTEFZlcmlTaWduTVBLSS0yLTgwHQYDVR0OBBYEFM+Zqep7JvRLyY6P1/AF 170 | # Ju/j0qedMB8GA1UdIwQYMBaAFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqGSIb3 171 | # DQEBBQUAA4IBAQBWIuY0pMRhy0i5Aa1WqGQP2YyRxLvMDOWteqAif99HOEotbNF/ 172 | # cRp87HCpsfBP5A8MU/oVXv50mEkkhYEmHJEUR7BMY4y7oTTUxkXoDYUmcwPQqYxk 173 | # bdxxkuZFBWAVWVE5/FgUa/7UpO15awgMQXLnNyIGCb4j6T9Emh7pYZ3MsZBc/D3S 174 | # jaxCPWU21LQ9QCiPmxDPIybMSyDLkB9djEw0yjzY5TfWb6UgvTTrJtmuDefFmveh 175 | # tCGRM2+G6Fi7JXx0Dlj+dRtjP84xfJuPG5aexVN2hFucrZH6rO2Tul3IIVPCglNj 176 | # rxINUIcRGz1UUpaKLJw9khoImgUux5OlSJHTMYICazCCAmcCAQEwgckwgbQxCzAJ 177 | # BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy 178 | # aVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0IGh0 179 | # dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMTAxLjAsBgNVBAMTJVZlcmlT 180 | # aWduIENsYXNzIDMgQ29kZSBTaWduaW5nIDIwMTAgQ0ECEFQzAlKNsl3SfVbjHU+f 181 | # 7O4wCQYFKw4DAhoFAKB4MBgGCisGAQQBgjcCAQwxCjAIoAKAAKECgAAwGQYJKoZI 182 | # hvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcC 183 | # ARUwIwYJKoZIhvcNAQkEMRYEFLBHHIMoE+a3PK/a9v1fXJskI//gMA0GCSqGSIb3 184 | # DQEBAQUABIIBAB8okMWQVmFjQApS1k135o3oddYjGCZ6PxovOLqNrp5DL/DU/zaF 185 | # 1SPqiOnIiM0U4voG3mTwMAxop+c+r72SSjVUYcrdeNTK77uP2Js6pixJOgvy7z2W 186 | # vOafSLIFzR4Yaf7U90DCN0051klcRrRUstWG2s+3/sA3FMfhpONPzHe51/cEJvZI 187 | # O2EgjIyBfZuVO3E+Epaf8HNV8syKWFyu+Q32w51aYpTztKlIoiT8k6ET94l18Lhv 188 | # l0204bKO3QDA/PqlMH0jF9fbe723ToFrbDIwRIbSzjjpgjanI2mRBLgICdY7Aql5 189 | # drK4r3AQ/NTQWEumaKD6jZrOHRGR8pqWT2o= 190 | # SIG # End signature block 191 | -------------------------------------------------------------------------------- /Add-on.ModuleManagement/Resources/ConvertToModule.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ModuleManagement/Resources/ConvertToModule.ico -------------------------------------------------------------------------------- /Add-on.ModuleManagement/Resources/NewManifest.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ModuleManagement/Resources/NewManifest.ico -------------------------------------------------------------------------------- /Add-on.ModuleManagement/Resources/NewModule.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ModuleManagement/Resources/NewModule.ico -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Add-on.ScriptEditorEssentials.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Add-on.ScriptEditorEssentials.psd1 -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Add-on.ScriptEditorEssentials.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Add-on.ScriptEditorEssentials.psm1 -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Resources/ClearPowerShellConsole.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Resources/ClearPowerShellConsole.ico -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Resources/DecreaseIndent.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Resources/DecreaseIndent.ico -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Resources/IncreaseIndent.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Resources/IncreaseIndent.ico -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Resources/ViewWhiteSpace.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Resources/ViewWhiteSpace.ico -------------------------------------------------------------------------------- /Add-on.ScriptEditorEssentials/Resources/WordWrap.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.ScriptEditorEssentials/Resources/WordWrap.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Add-on.SnippetManager.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Add-on.SnippetManager.psd1 -------------------------------------------------------------------------------- /Add-on.SnippetManager/Add-on.SnippetManager.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Add-on.SnippetManager.psm1 -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/0.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/0.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/1.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/10.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/10.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/2.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/3.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/4.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/4.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/5.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/5.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/6.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/6.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/7.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/7.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/8.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/9.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/9.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/SearchB.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/SearchB.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/barRED.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/barRED.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/bargreen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/bargreen.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/barwhite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/barwhite.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/baryellow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/baryellow.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/box.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/folder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/folder.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/folderPGpath.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/folderPGpath.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/foundsnippet.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/foundsnippet.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/logoII_129x72_s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/logoII_129x72_s.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/menubar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/menubar.jpg -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/root-NA.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/root-NA.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/root-PGuse.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/root-PGuse.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/root-readonly.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/root-readonly.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/root.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/root.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/rootroot.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/rootroot.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/search-nores.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/search-nores.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/snippet-NotActive.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/snippet-NotActive.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/snippet.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/snippet.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/snippeticonPG.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/snippeticonPG.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/Resources/ico/windowicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Resources/ico/windowicon.ico -------------------------------------------------------------------------------- /Add-on.SnippetManager/SnipMan.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/SnipMan.ps1 -------------------------------------------------------------------------------- /Add-on.SnippetManager/Snipman_rm.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Snipman_rm.ps1 -------------------------------------------------------------------------------- /Add-on.SnippetManager/Snipman_updater.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Add-on.SnippetManager/Snipman_updater.ps1 -------------------------------------------------------------------------------- /DotNet/DotNet.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/DotNet/DotNet.psm1 -------------------------------------------------------------------------------- /DotNet/Get-CommandWithParameterType.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/DotNet/Get-CommandWithParameterType.ps1 -------------------------------------------------------------------------------- /DotNet/Get-ProgID.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/DotNet/Get-ProgID.ps1 -------------------------------------------------------------------------------- /DotNet/Get-Type.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/DotNet/Get-Type.ps1 -------------------------------------------------------------------------------- /EZOut/Add-FormatData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Add-FormatData.ps1 -------------------------------------------------------------------------------- /EZOut/Add-TypeData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Add-TypeData.ps1 -------------------------------------------------------------------------------- /EZOut/Assets/EzOut_Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Assets/EzOut_Small.png -------------------------------------------------------------------------------- /EZOut/Assets/EzOut_Splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Assets/EzOut_Splash.png -------------------------------------------------------------------------------- /EZOut/Assets/EzOut_Store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Assets/EzOut_Store.png -------------------------------------------------------------------------------- /EZOut/Assets/EzOut_Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Assets/EzOut_Tile.png -------------------------------------------------------------------------------- /EZOut/Assets/EzOut_Wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Assets/EzOut_Wide.png -------------------------------------------------------------------------------- /EZOut/Assets/f_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Assets/f_logo.png -------------------------------------------------------------------------------- /EZOut/Clear-FormatData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Clear-FormatData.ps1 -------------------------------------------------------------------------------- /EZOut/Clear-TypeData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Clear-TypeData.ps1 -------------------------------------------------------------------------------- /EZOut/ConvertTo-PropertySet.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/ConvertTo-PropertySet.ps1 -------------------------------------------------------------------------------- /EZOut/ConvertTo-TypePropertySet.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/ConvertTo-TypePropertySet.ps1 -------------------------------------------------------------------------------- /EZOut/EZOut.Pipeworks.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/EZOut.Pipeworks.psd1 -------------------------------------------------------------------------------- /EZOut/EZOut.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/EZOut.psd1 -------------------------------------------------------------------------------- /EZOut/EZOut.psm1: -------------------------------------------------------------------------------- 1 | 2 | $Script:FormatModules = @{} 3 | $script:TypeModules = @{} 4 | 5 | 6 | #region Formatters 7 | . $psScriptRoot\Add-FormatData.ps1 8 | . $psScriptRoot\Clear-FormatData.ps1 9 | . $psScriptRoot\Remove-FormatData.ps1 10 | 11 | . $psScriptRoot\Out-FormatData.ps1 12 | . $psScriptRoot\Show-CustomAction.ps1 13 | . $psScriptRoot\Write-FormatView.ps1 14 | . $psScriptRoot\Write-CustomAction.ps1 15 | . $psScriptRoot\Write-FormatTableView.ps1 16 | #endregion Formatters 17 | 18 | #region Format Discovery 19 | . $psScriptRoot\Get-FormatFile.ps1 20 | . $psScriptRoot\Find-FormatView.ps1 21 | #endregion Format Discovery 22 | 23 | #region Property Sets 24 | . $psScriptRoot\ConvertTo-PropertySet.ps1 25 | . $psScriptRoot\Get-PropertySet.ps1 26 | . $psScriptRoot\Write-PropertySet.ps1 27 | 28 | Set-Alias ConvertTo-TypePropertySet ConvertTo-PropertySet 29 | #endregion Property Sets 30 | 31 | . $psScriptRoot\Write-PowerShellHashtable.ps1 32 | . $psScriptRoot\Write-CommandOverload.ps1 33 | 34 | #region TypeData 35 | . $psScriptRoot\Add-TypeData.ps1 36 | . $psScriptRoot\Clear-TypeData.ps1 37 | . $psScriptRoot\Remove-TypeData.ps1 38 | 39 | . $psScriptRoot\Out-TypeData.ps1 40 | . $psScriptRoot\Write-TypeView.ps1 41 | #endregion TypeData 42 | 43 | Export-ModuleMember -Function * -Alias * 44 | 45 | 46 | $myInvocation.MyCommand.ScriptBlock.Module.OnRemove = { 47 | Clear-FormatData 48 | Clear-TypeData 49 | } 50 | -------------------------------------------------------------------------------- /EZOut/Find-FormatView.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Find-FormatView.ps1 -------------------------------------------------------------------------------- /EZOut/Get-FormatFile.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Get-FormatFile.ps1 -------------------------------------------------------------------------------- /EZOut/Get-PropertySet.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Get-PropertySet.ps1 -------------------------------------------------------------------------------- /EZOut/New-EZFormatFile.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/New-EZFormatFile.ps1 -------------------------------------------------------------------------------- /EZOut/Out-FormatData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Out-FormatData.ps1 -------------------------------------------------------------------------------- /EZOut/Out-TypeData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Out-TypeData.ps1 -------------------------------------------------------------------------------- /EZOut/Remove-FormatData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Remove-FormatData.ps1 -------------------------------------------------------------------------------- /EZOut/Remove-TypeData.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Remove-TypeData.ps1 -------------------------------------------------------------------------------- /EZOut/Show-CustomAction.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Show-CustomAction.ps1 -------------------------------------------------------------------------------- /EZOut/Write-CommandOverload.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-CommandOverload.ps1 -------------------------------------------------------------------------------- /EZOut/Write-CustomAction.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-CustomAction.ps1 -------------------------------------------------------------------------------- /EZOut/Write-FormatTableView.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-FormatTableView.ps1 -------------------------------------------------------------------------------- /EZOut/Write-FormatView.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-FormatView.ps1 -------------------------------------------------------------------------------- /EZOut/Write-PowerShellHashtable.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-PowerShellHashtable.ps1 -------------------------------------------------------------------------------- /EZOut/Write-PropertySet.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-PropertySet.ps1 -------------------------------------------------------------------------------- /EZOut/Write-TypeView.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/Write-TypeView.ps1 -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_55_fbf9ee_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_55_fbf9ee_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_66_f2890c_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_66_f2890c_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_75_f2890c_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_75_f2890c_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_75_fafafa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_75_fafafa_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_90_fafafa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_90_fafafa_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-bg_flat_95_fef1ec_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-bg_flat_95_fef1ec_40x100.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-icons_f2890c_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-icons_f2890c_256x240.png -------------------------------------------------------------------------------- /EZOut/css/custom-theme/images/ui-icons_fafafa_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/css/custom-theme/images/ui-icons_fafafa_256x240.png -------------------------------------------------------------------------------- /EZOut/en-us/Creating_A_New_View.walkthru.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/en-us/Creating_A_New_View.walkthru.help.txt -------------------------------------------------------------------------------- /EZOut/en-us/Creating_Colorized_Format_With_Custom_Actions.walkthru.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/en-us/Creating_Colorized_Format_With_Custom_Actions.walkthru.help.txt -------------------------------------------------------------------------------- /EZOut/en-us/Getting_Started_With_Table_Views.walkthru.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/en-us/Getting_Started_With_Table_Views.walkthru.help.txt -------------------------------------------------------------------------------- /EZOut/en-us/Improving_How_Xml_Looks_In_PowerShell.walkthru.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/en-us/Improving_How_Xml_Looks_In_PowerShell.walkthru.help.txt -------------------------------------------------------------------------------- /EZOut/en-us/Making_Select-Object_Simpler_with_PropertySets.walkthru.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/en-us/Making_Select-Object_Simpler_with_PropertySets.walkthru.help.txt -------------------------------------------------------------------------------- /EZOut/en-us/about_EZOut.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/EZOut/en-us/about_EZOut.help.txt -------------------------------------------------------------------------------- /FileSystem/Copy-ToZip.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Copy-ToZip.ps1 -------------------------------------------------------------------------------- /FileSystem/FileSystem.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/FileSystem.psd1 -------------------------------------------------------------------------------- /FileSystem/FileSystem.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/FileSystem.psm1 -------------------------------------------------------------------------------- /FileSystem/Get-DuplicateFile.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Get-DuplicateFile.ps1 -------------------------------------------------------------------------------- /FileSystem/Get-FreeDiskSpace.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Get-FreeDiskSpace.ps1 -------------------------------------------------------------------------------- /FileSystem/Get-SHA1.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Get-SHA1.ps1 -------------------------------------------------------------------------------- /FileSystem/Mount-SpecialFolder.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Mount-SpecialFolder.ps1 -------------------------------------------------------------------------------- /FileSystem/New-Zip.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/New-Zip.ps1 -------------------------------------------------------------------------------- /FileSystem/Rename-Drive.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Rename-Drive.ps1 -------------------------------------------------------------------------------- /FileSystem/Resolve-ShortcutFile.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Resolve-ShortcutFile.ps1 -------------------------------------------------------------------------------- /FileSystem/Start-FileSystemWatcher.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/FileSystem/Start-FileSystemWatcher.ps1 -------------------------------------------------------------------------------- /FileSystem/en-us/about_FileSystem_Module.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_FileSystem_Module 3 | 4 | SHORT DESCRIPTION 5 | Describes the FileSystem module in the Windows 7 Resource Kit. 6 | 7 | LONG DESCRIPTION 8 | The FileSystem module contains functions that work on the file system 9 | drives in Windows PowerShell. 10 | 11 | The following functions are added to your session when you import 12 | the FileSystem module 13 | 14 | Copy-ToZip Compresses files and adds them to a ZIP file. 15 | Get-DuplicateFile Finds files that have identical file contents. 16 | Get-FreeDiskSpace Gets the free disk space on logical drives 17 | of the local computer or a remote computer. 18 | 19 | Get-SHA1 Computes the SHA1 hash of the specified file. 20 | Mount-SpecialFolder Creates PSDrives for special folders in the system. 21 | New-Zip Creates a new zip archive. 22 | Rename-Drive Renames a file system drive. 23 | 24 | For information about these functions, use the Get-Help cmdlet. For example, 25 | to get detailed help for the Copy-ToZip function, type "get-help copy-tozip -detailed." 26 | 27 | 28 | NOTE: The Mount-SpecialFolder is run automatically in your session when 29 | you import the FileSystem module. As a result, the session includes 30 | a Windows PowerShell drive (PSDrive) for each special folder in the 31 | system. 32 | 33 | These functions are implemented as scripts, but are available in the 34 | session as functions. 35 | 36 | 37 | SEE ALSO 38 | about_Modules 39 | Get-Module 40 | Import-Module 41 | Remove-Module 42 | -------------------------------------------------------------------------------- /FileSystem/en-us/about_FileSystem_Readme.help.txt: -------------------------------------------------------------------------------- 1 | 2 | NAME 3 | Get-FreeDiskSpace 4 | 5 | SYNOPSIS 6 | Gets the free disk space on logical drives 7 | of the local computer or a remote computer. 8 | 9 | 10 | SYNTAX 11 | Get-FreeDiskSpace [-Drive ] [-SampleInterval ] [-MaxSamples 12 | ] [-Continuous] [-ComputerName ] [] 13 | 14 | 15 | DESCRIPTION 16 | Gets the performance counters values for free disk space, 17 | both in megabytes and as a percentage for all or selected 18 | logical drives of the local computer or a remote computer. 19 | 20 | 21 | RELATED LINKS 22 | Get-Counter 23 | 24 | REMARKS 25 | To see the examples, type: "get-help Get-FreeDiskSpace -examples". 26 | For more information, type: "get-help Get-FreeDiskSpace -detailed". 27 | For technical information, type: "get-help Get-FreeDiskSpace -full". 28 | 29 | NAME 30 | New-Zip 31 | 32 | SYNOPSIS 33 | Creates a new zip archive. 34 | 35 | 36 | SYNTAX 37 | New-Zip [-Path] [-PassThru] [-Force] [] 38 | 39 | 40 | DESCRIPTION 41 | The New-Zip function creates a ZIP archive file (.zip) 42 | with no contents (no compressed files). To add files to 43 | the ZIP archive, use the Copy-ToZip function. 44 | 45 | 46 | RELATED LINKS 47 | Copy-ToZip 48 | 49 | REMARKS 50 | To see the examples, type: "get-help New-Zip -examples". 51 | For more information, type: "get-help New-Zip -detailed". 52 | For technical information, type: "get-help New-Zip -full". 53 | 54 | NAME 55 | Resolve-ShortcutFile 56 | 57 | SYNOPSIS 58 | Resolves an Internet shortcut file to the web site the shortcut references 59 | 60 | 61 | SYNTAX 62 | Resolve-ShortcutFile [[-Filename] ] [] 63 | 64 | 65 | DESCRIPTION 66 | Parses an Internet shortcut file and returns a property bag containing the 67 | shortcut file and the URL it resolves to. 68 | 69 | 70 | RELATED LINKS 71 | Get-Content 72 | Get-Item 73 | Select-Object 74 | Where-Object 75 | 76 | REMARKS 77 | To see the examples, type: "get-help Resolve-ShortcutFile -examples". 78 | For more information, type: "get-help Resolve-ShortcutFile -detailed". 79 | For technical information, type: "get-help Resolve-ShortcutFile -full". 80 | 81 | NAME 82 | Mount-SpecialFolder 83 | 84 | SYNOPSIS 85 | Creates a PSDrive for special folders in the system. 86 | 87 | 88 | SYNTAX 89 | Mount-SpecialFolder [[-Folder] ] [] 90 | 91 | 92 | DESCRIPTION 93 | The Mount-SpecialFolder function creates a Windows 94 | PowerShell drive (PSDrive) for a specified special 95 | folder or all special folders in the system. 96 | 97 | The Mount-SpecialFolder function is run automatically 98 | when you import the FileSystem module. To see the PSDrives 99 | in your session, type "get-psdrive". 100 | 101 | 102 | RELATED LINKS 103 | http://blogs.msdn.com/powershell/archive/2008/12/13/explore-your-environme 104 | nt.aspx 105 | http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.a 106 | spx 107 | Get-PSDrive 108 | New-PSDrive 109 | Remove-PSDrive 110 | 111 | REMARKS 112 | To see the examples, type: "get-help Mount-SpecialFolder -examples". 113 | For more information, type: "get-help Mount-SpecialFolder -detailed". 114 | For technical information, type: "get-help Mount-SpecialFolder -full". 115 | 116 | NAME 117 | Start-FileSystemWatcher 118 | 119 | SYNOPSIS 120 | Starts monitoring for file changes 121 | 122 | 123 | SYNTAX 124 | Start-FileSystemWatcher [-File] [-Filter ] [-Recurse] [-On 125 | ] [-Do ] [] 126 | 127 | 128 | DESCRIPTION 129 | Starts monitoring for file changes using the events on IO.FileSystemWatcher 130 | 131 | 132 | RELATED LINKS 133 | 134 | REMARKS 135 | To see the examples, type: "get-help Start-FileSystemWatcher -examples". 136 | For more information, type: "get-help Start-FileSystemWatcher -detailed". 137 | For technical information, type: "get-help Start-FileSystemWatcher -full". 138 | 139 | NAME 140 | Get-DuplicateFile 141 | 142 | SYNOPSIS 143 | Finds files that have identical file contents. 144 | 145 | 146 | SYNTAX 147 | Get-DuplicateFile [[-Directory] ] [-Recurse] [-HideProgress] [] 149 | 150 | 151 | DESCRIPTION 152 | The Get-DuplicateFile function detects files in a drive 153 | or directory that have identical file content by comparing 154 | an SHA1 cryptographic hash of the file contents. 155 | 156 | 157 | RELATED LINKS 158 | Get-SHA1 159 | 160 | REMARKS 161 | To see the examples, type: "get-help Get-DuplicateFile -examples". 162 | For more information, type: "get-help Get-DuplicateFile -detailed". 163 | For technical information, type: "get-help Get-DuplicateFile -full". 164 | 165 | NAME 166 | Rename-Drive 167 | 168 | SYNOPSIS 169 | Renames a file system drive. 170 | 171 | 172 | SYNTAX 173 | Rename-Drive [[-Drive] ] [[-Name] ] [] 174 | 175 | 176 | DESCRIPTION 177 | The Rename-Drive function provides a new volume name for 178 | a drive on the local computer. 179 | 180 | To use this function, start Windows PowerShell with the "Run as 181 | administrator" option. 182 | 183 | 184 | RELATED LINKS 185 | 186 | REMARKS 187 | To see the examples, type: "get-help Rename-Drive -examples". 188 | For more information, type: "get-help Rename-Drive -detailed". 189 | For technical information, type: "get-help Rename-Drive -full". 190 | 191 | NAME 192 | Get-SHA1 193 | 194 | SYNOPSIS 195 | Computes the SHA1 hash of the specified file. 196 | 197 | 198 | SYNTAX 199 | Get-SHA1 [[-File] ] [] 200 | 201 | 202 | DESCRIPTION 203 | The Get-SHA1 function creates a cryptographic hash of the file 204 | specified in the File parameter by using the SHA1 method. 205 | 206 | 207 | RELATED LINKS 208 | 209 | REMARKS 210 | To see the examples, type: "get-help Get-SHA1 -examples". 211 | For more information, type: "get-help Get-SHA1 -detailed". 212 | For technical information, type: "get-help Get-SHA1 -full". 213 | 214 | NAME 215 | Copy-ToZip 216 | 217 | SYNOPSIS 218 | Compresses files and adds them to a ZIP file. 219 | 220 | 221 | SYNTAX 222 | Copy-ToZip [-File] [-ZipFile] [-HideProgress] [-Force] [< 223 | CommonParameters>] 224 | 225 | 226 | DESCRIPTION 227 | The Copy-ToZip function compresses files and 228 | adds the compressed files to a ZIP archive file. 229 | 230 | If the ZIP file does not exist, this function 231 | creates it. You can also use this function to add 232 | compressed files to a ZIP file that you create by 233 | using the New-Zip function. 234 | 235 | 236 | RELATED LINKS 237 | New-Zip 238 | 239 | REMARKS 240 | To see the examples, type: "get-help Copy-ToZip -examples". 241 | For more information, type: "get-help Copy-ToZip -detailed". 242 | For technical information, type: "get-help Copy-ToZip -full". 243 | 244 | 245 | 246 | -------------------------------------------------------------------------------- /GMI-SQL/GMI-SQL.psd1: -------------------------------------------------------------------------------- 1 | # 2 | # Module manifest for module 'GMI-SQL' 3 | # 4 | # Generated by: Ryan Andorfer 5 | # 6 | # Generated on: 3/25/2014 7 | # 8 | 9 | @{ 10 | 11 | # Script module or binary module file associated with this manifest. 12 | RootModule = '.\GMI-SQL.psm1' 13 | 14 | # Version number of this module. 15 | ModuleVersion = '1.0.2' 16 | 17 | # ID used to uniquely identify this module 18 | GUID = '28c4f89c-5cbb-4027-ab07-3511d46b8b10' 19 | 20 | # Author of this module 21 | Author = 'Ryan Andorfer' 22 | 23 | # Company or vendor of this module 24 | CompanyName = 'ScorchDev' 25 | 26 | # Copyright statement for this module 27 | Copyright = '(c) 2014 General Mills, Inc. All rights reserved.' 28 | 29 | # Description of the functionality provided by this module 30 | # Description = '' 31 | 32 | # Minimum version of the Windows PowerShell engine required by this module 33 | PowerShellVersion = '2.0' 34 | 35 | # Name of the Windows PowerShell host required by this module 36 | # PowerShellHostName = '' 37 | 38 | # Minimum version of the Windows PowerShell host required by this module 39 | # PowerShellHostVersion = '' 40 | 41 | # Minimum version of Microsoft .NET Framework required by this module 42 | # DotNetFrameworkVersion = '' 43 | 44 | # Minimum version of the common language runtime (CLR) required by this module 45 | # CLRVersion = '' 46 | 47 | # Processor architecture (None, X86, Amd64) required by this module 48 | # ProcessorArchitecture = '' 49 | 50 | # Modules that must be imported into the global environment prior to importing this module 51 | # RequiredModules = @() 52 | 53 | # Assemblies that must be loaded prior to importing this module 54 | # RequiredAssemblies = @() 55 | 56 | # Script files (.ps1) that are run in the caller's environment prior to importing this module. 57 | # ScriptsToProcess = @('') 58 | 59 | # Type files (.ps1xml) to be loaded when importing this module 60 | # TypesToProcess = @() 61 | 62 | # Format files (.ps1xml) to be loaded when importing this module 63 | # FormatsToProcess = @() 64 | 65 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess 66 | NestedModules = @() 67 | 68 | # Functions to export from this module 69 | FunctionsToExport = '*' 70 | 71 | # Cmdlets to export from this module 72 | CmdletsToExport = '*' 73 | 74 | # Variables to export from this module 75 | VariablesToExport = '*' 76 | 77 | # Aliases to export from this module 78 | AliasesToExport = '*' 79 | 80 | # List of all modules packaged with this module 81 | ModuleList = @('GMI-SQL') 82 | 83 | # List of all files packaged with this module 84 | FileList = @('GMI-SQL.psd1','GMI-SQL.psm1') 85 | 86 | # Private data to pass to the module specified in RootModule/ModuleToProcess 87 | # PrivateData = '' 88 | 89 | # HelpInfo URI of this module 90 | # HelpInfoURI = '' 91 | 92 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. 93 | # DefaultCommandPrefix = '' 94 | } 95 | 96 | -------------------------------------------------------------------------------- /GMI-SQL/GMI-SQL.psm1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | Uses ADO .NET to query SQL 4 | 5 | .Description 6 | Queries a SQL Database and returns a datatable of results 7 | 8 | .Parameter query 9 | The SQL Query to run 10 | 11 | .Parameter parameters 12 | A list of SQLParameters to pass to the query 13 | 14 | .Parameter connectionString 15 | Sql Connection string for the DB to connect to 16 | 17 | .Parameter timeout 18 | timeout property for SQL query. Default is 60 seconds 19 | 20 | .Example 21 | # run a simple query 22 | 23 | $connectionString = "" 24 | $parameters = @{} 25 | Invoke-SqlQuery -query "SELECT GroupID, GroupName From [dbo].[Group] WHERE GroupName=@GroupName" -parameters @{"@GroupName"="genmills\groupName"} -connectionString $connectionString; 26 | Invoke-SqlQuery -query "SELECT GroupID, GroupName From [dbo].[Group]" -parameters @{} -connectionString $connectionString; 27 | 28 | #> 29 | function Invoke-SqlQuery([string]$query, [System.Collections.Hashtable] $parameters, [string] $connectionString, [int]$timeout=60) 30 | { 31 | # convert parameter string to array of SqlParameters 32 | 33 | try 34 | { 35 | $sqlConnection = new-object System.Data.SqlClient.SqlConnection $connectionString 36 | $sqlConnection.Open() 37 | 38 | #Create a command object 39 | $sqlCommand = $sqlConnection.CreateCommand() 40 | $sqlCommand.CommandText = $query; 41 | if($parameters) 42 | { 43 | foreach($key in $parameters.Keys) 44 | { 45 | $sqlCommand.Parameters.AddWithValue($key, $parameters[$key]) | Out-Null 46 | } 47 | } 48 | 49 | $sqlCommand.CommandTimeout = $timeout 50 | 51 | #Execute the Command 52 | $sqlReader = $sqlCommand.ExecuteReader() 53 | 54 | $Datatable = New-Object System.Data.DataTable 55 | $DataTable.Load($SqlReader) 56 | 57 | 58 | return $DataTable; 59 | } 60 | finally 61 | { 62 | if($sqlConnection -and $sqlConnection.State -ne [System.Data.ConnectionState]::Closed) 63 | { 64 | $sqlConnection.Close(); 65 | } 66 | } 67 | } 68 | export-modulemember -Function * -------------------------------------------------------------------------------- /HSGWMImoduleV6/HSGWMImoduleV6.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/HSGWMImoduleV6/HSGWMImoduleV6.psm1 -------------------------------------------------------------------------------- /HyperV/HyperV.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/HyperV/HyperV.psd1 -------------------------------------------------------------------------------- /HyperV/v1Compatability.ps1: -------------------------------------------------------------------------------- 1 | #################################### 2 | # Aliases for backward compatability 3 | #################################### 4 | 5 | Set-Alias -Name List-VMState -Value Get-VMSummary 6 | Set-Alias -Name Get-VMState -Value Get-VMSummary 7 | Set-Alias -Name Suspend-vm -Value Save-vm 8 | Set-Alias -Name Shutdown-vm -Value Invoke-VMShutdown 9 | Set-Alias -Name Choose-List -Value Select-List 10 | Set-Alias -Name Choose-Tree -Value Select-Tree 11 | Set-Alias -Name Choose-VM -Value Select-VM 12 | Set-Alias -Name Choose-VMPhysicalDisk -Value Select-VMPhysicalDisk 13 | Set-Alias -Name Choose-VMSwitch -Value Select-VMSwitch 14 | Set-Alias -Name Choose-VMNIC -Value Select-VMNIC 15 | Set-Alias -Name Choose-VMExternalEthernet -Value Select-VMExternalEthernet 16 | Set-Alias -Name Choose-VMSnapshot -Value Select-VMSnapshot 17 | Set-Alias -Name Apply-Snapshot -Value Restore-VMsnapshot 18 | Set-Alias -Name Set-VMSettings -Value set-vm 19 | Set-Alias -Name Add-NewVMHardDisk -Value Add-VMNewHardDisk 20 | Set-Alias -Name compact-VHD -Value Compress-VHD 21 | 22 | 23 | #################################### 24 | # Hash-Tables for backward compatability 25 | #################################### 26 | 27 | 28 | $VMState = ([type]"VMState" ).getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 29 | $ReturnCode = ([type]"ReturnCode" ).getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 30 | $BootMedia = ([type]"BootMedia" ).getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 31 | $StartupAction = ([type]"StartupAction" ).getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 32 | $ShutDownAction = ([type]"ShutDownAction").getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 33 | $Recoveryaction = ([type]"Recoveryaction").getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 34 | $DiskType = ([type]"VHDType" ).getfields() |foreach-object -begin {$list=@{}} -process { if (-not $_.isspecialName) { $list[[string]$_.getValue($null)]=[int]$_.getValue($null)}} -end {$list} 35 | 36 | 37 | Function Convert-VMState 38 | { <# 39 | .Synopsis 40 | This function has been deprecated. The [VMState] enum should be used instead" 41 | .Example 42 | PS> Convert-VMState $ID 43 | Should be written as [VMState]$ID 44 | .Parameter $ID 45 | An ID to convert 46 | #> 47 | Param ($ID) 48 | Write-Warning "This function has been deprecated. Please replace calls to Convert-VMState`nto use the [VMState] enum." 49 | return ([vmState]$ID) 50 | } 51 | #replace calls to convert-VMstate with [vmstate] 52 | 53 | -------------------------------------------------------------------------------- /LogHelper/LogHelper.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | 3 | # Script module or binary module file associated with this manifest 4 | ModuleToProcess = 'LogHelper' 5 | 6 | # Version number of this module. 7 | ModuleVersion = '1.0.0.0' 8 | 9 | # ID used to uniquely identify this module 10 | GUID = '{9b13d1af-effb-4827-b880-17e106dac3a1}' 11 | 12 | # Author of this module 13 | Author = 'Kendal Van Dyke' 14 | 15 | # Company or vendor of this module 16 | CompanyName = 'Kendal Van Dyke' 17 | 18 | # Copyright statement for this module 19 | Copyright = '(c) 2013. All rights reserved.' 20 | 21 | # Description of the functionality provided by this module 22 | Description = 'Functions to help log script and module information' 23 | 24 | # Minimum version of the Windows PowerShell engine required by this module 25 | PowerShellVersion = '2.0' 26 | 27 | # Minimum version of the .NET Framework required by this module 28 | DotNetFrameworkVersion = '2.0' 29 | 30 | # Minimum version of the common language runtime (CLR) required by this module 31 | CLRVersion = '2.0.50727' 32 | 33 | # Processor architecture (None, X86, Amd64, IA64) required by this module 34 | ProcessorArchitecture = 'None' 35 | 36 | # Modules that must be imported into the global environment prior to importing 37 | # this module 38 | RequiredModules = @() 39 | 40 | # Assemblies that must be loaded prior to importing this module 41 | RequiredAssemblies = @() 42 | 43 | # Script files (.ps1) that are run in the caller's environment prior to 44 | # importing this module 45 | ScriptsToProcess = @() 46 | 47 | # Type files (.ps1xml) to be loaded when importing this module 48 | TypesToProcess = @() 49 | 50 | # Format files (.ps1xml) to be loaded when importing this module 51 | FormatsToProcess = @() 52 | 53 | # Modules to import as nested modules of the module specified in 54 | # ModuleToProcess 55 | NestedModules = @() 56 | 57 | # Functions to export from this module 58 | FunctionsToExport = '*' 59 | 60 | # Cmdlets to export from this module 61 | CmdletsToExport = '*' 62 | 63 | # Variables to export from this module 64 | VariablesToExport = '' 65 | 66 | # Aliases to export from this module 67 | AliasesToExport = '*' 68 | 69 | # List of all modules packaged with this module 70 | ModuleList = @() 71 | 72 | # List of all files packaged with this module 73 | FileList = @('LogHelper.psm1') 74 | 75 | # Private data to pass to the module specified in ModuleToProcess 76 | PrivateData = @{} 77 | 78 | } 79 | -------------------------------------------------------------------------------- /LogHelper/LogHelper.psm1: -------------------------------------------------------------------------------- 1 | ########################## 2 | # PRIVATE SCRIPT VARIABLES 3 | ########################## 4 | New-Variable -Name LogFile -Value $null -Scope Script -Visibility Private 5 | New-Variable -Name LoggingPreference -Value 'none' -Scope Script -Visibility Private 6 | New-Variable -Name WriteFailureRetry -Value 10 -Scope Script -Visibility Private 7 | New-Variable -Name LogQueue -Value $null -Scope Script -Visibility Private 8 | New-Variable -Name LogQueueIsLocked -Value $false -Scope Script -Visibility Private 9 | 10 | $script:LogQueue = [System.Collections.Queue]::Synchronized((New-Object -TypeName System.Collections.Queue)) 11 | $script:LogFile = [System.IO.Path]::ChangeExtension([IO.Path]::GetTempFileName(),'txt') 12 | 13 | 14 | 15 | ################### 16 | # PUBLIC FUNCTIONS 17 | ################### 18 | function Set-LogFile { 19 | [CmdletBinding()] 20 | param( 21 | [Parameter(Position=0, Mandatory=$true)] 22 | [ValidateNotNullOrEmpty()] 23 | [System.String] 24 | $Path 25 | ) 26 | try { 27 | if ((Split-Path -Path $Path -Parent | Test-Path) -eq $true) { 28 | $script:LogFile = $Path 29 | } else { 30 | throw 'Invalid logfile path specified' 31 | } 32 | } 33 | catch { 34 | throw 35 | } 36 | } 37 | 38 | function Set-LoggingPreference { 39 | [CmdletBinding()] 40 | param( 41 | [Parameter(Position=0, Mandatory=$true)] 42 | #[ValidateSet('none','minimal','normal','verbose')] 43 | [ValidateSet('none','standard','verbose','debug')] 44 | [System.String] 45 | $Preference 46 | ) 47 | try { 48 | $script:LoggingPreference = $Preference 49 | } 50 | catch { 51 | throw 52 | } 53 | } 54 | 55 | function Set-LogQueue { 56 | [CmdletBinding()] 57 | param( 58 | [Parameter(Position=0, Mandatory=$true)] 59 | [ValidateNotNull()] 60 | [System.Collections.Queue] 61 | $Queue 62 | ) 63 | try { 64 | if ($Queue.IsSynchronized) { 65 | $script:LogQueue = $Queue 66 | } else { 67 | $script:LogQueue = [System.Collections.Queue]::Synchronized($Queue) 68 | } 69 | } 70 | catch { 71 | throw 72 | } 73 | } 74 | 75 | function Get-LogFile { 76 | Write-Output $script:LogFile 77 | } 78 | 79 | function Get-LoggingPreference { 80 | Write-Output $script:LoggingPreference 81 | } 82 | 83 | function Write-Log { 84 | <# 85 | .SYNOPSIS 86 | A brief description of the function. 87 | 88 | .DESCRIPTION 89 | A detailed description of the function. 90 | 91 | .PARAMETER ParameterA 92 | The description of the ParameterA parameter. 93 | 94 | .PARAMETER ParameterB 95 | The description of the ParameterB parameter. 96 | 97 | .EXAMPLE 98 | PS C:\> Get-Something -ParameterA 'One value' -ParameterB 32 99 | 100 | .EXAMPLE 101 | PS C:\> Get-Something 'One value' 32 102 | 103 | .INPUTS 104 | System.String,System.Int32 105 | 106 | .OUTPUTS 107 | System.String 108 | 109 | .NOTES 110 | Additional information about the function go here. 111 | 112 | .LINK 113 | about_functions_advanced 114 | 115 | .LINK 116 | about_comment_based_help 117 | 118 | #> 119 | [CmdletBinding()] 120 | param( 121 | [Parameter(Position=0, Mandatory=$true)] 122 | [ValidateNotNullOrEmpty()] 123 | [System.String] 124 | $Message 125 | , 126 | [Parameter(Position=1, Mandatory=$true)] 127 | [alias('level')] 128 | [ValidateSet('information','verbose','debug','error','warning')] 129 | [System.String] 130 | $MessageLevel 131 | ) 132 | try { 133 | $WriteToLog = $false 134 | 135 | # Determine if we're going to write to the log based on the logging preferences and message level 136 | $WriteToLog = switch ($script:LoggingPreference) { 137 | 'debug' { 138 | switch ($MessageLevel) { 139 | 'error' { $true } 140 | 'warning' { $true } 141 | 'information' { $true } 142 | 'verbose' { $true } 143 | 'debug' { $true } 144 | default { $false } 145 | } 146 | } 147 | 'verbose' { 148 | switch ($MessageLevel) { 149 | 'error' { $true } 150 | 'warning' { $true } 151 | 'information' { $true } 152 | 'verbose' { $true } 153 | default { $false } 154 | } 155 | } 156 | 'standard' { 157 | switch ($MessageLevel) { 158 | 'error' { $true } 159 | 'warning' { $true } 160 | 'information' { $true } 161 | default { $false } 162 | } 163 | } 164 | default { 165 | $false 166 | } 167 | } 168 | 169 | if ($WriteToLog -eq $true) { 170 | $Symbol = switch ($MessageLevel) { 171 | 'information' { '?' } 172 | 'verbose' { '$' } 173 | 'debug' { '*' } 174 | 'error' { '!' } 175 | 'warning' { '+' } 176 | } 177 | 178 | $script:LogQueue.Enqueue(("{0} {1} {2}" -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss.ffff'), $Symbol, $Message)) 179 | 180 | } else { 181 | 182 | # If we're not writing to the log then we need some way to alert on warnings and errors 183 | # so write to the warning and error streams 184 | if ($MessageLevel -ieq 'warning') { 185 | Write-Warning $Message -WarningAction Continue 186 | } 187 | elseif ($MessageLevel -ieq 'error') { 188 | Write-Error $Message -ErrorAction Continue 189 | } 190 | elseif ($MessageLevel -ieq 'verbose') { 191 | Write-Verbose $Message 192 | } 193 | elseif ($MessageLevel -ieq 'debug') { 194 | Write-Debug $Message 195 | } 196 | else { 197 | # For lack of a better "other" stream just write it to the debug stream 198 | Write-Debug $Message 199 | } 200 | 201 | } 202 | 203 | # Putting this outside of the $WriteToLog check b\c items may be in the queue 204 | # although $script:LoggingPreference may have changed (which would change $WriteToLog) 205 | # Another thought: Does this part belong in its own function? Or run as a background job? 206 | try { 207 | # Lock the queue...this prevents anything else from accessing it 208 | [System.Threading.Monitor]::Enter($script:LogQueue.SyncRoot) 209 | $script:LogQueueIsLocked = $true 210 | 211 | # Try and write each message in the queue 212 | # If we fail the item remains in the queue and will be handled on the next log entry 213 | while ($script:LogQueue.Count -gt 0) { 214 | $script:LogQueue.Peek() | Out-File -Encoding Default -FilePath $script:LogFile -Append 215 | $script:LogQueue.Dequeue() | Out-Null 216 | } 217 | } 218 | catch { 219 | } 220 | finally { 221 | if ($script:LogQueueIsLocked -eq $true) { 222 | [System.Threading.Monitor]::Exit($script:LogQueue.SyncRoot) 223 | $script:LogQueueIsLocked = $false 224 | } 225 | } 226 | 227 | } 228 | catch { 229 | Write-Host "$(Get-Date)`tError writing to log file: $Message" 230 | #throw 231 | } 232 | } 233 | 234 | 235 | ############################# 236 | # RUN WHEN MODULE IS UNLOADED 237 | ############################# 238 | $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = { 239 | try { 240 | # Lock the queue...this prevents anything else from accessing it 241 | [System.Threading.Monitor]::Enter($script:LogQueue.SyncRoot) 242 | $script:LogQueueIsLocked = $true 243 | 244 | # Try and write each message in the queue 245 | # If we fail the item remains in the queue and will be handled on the next log entry 246 | while ($script:LogQueue.Count -gt 0) { 247 | $script:LogQueue.Peek() | Out-File -Encoding Default -FilePath $script:LogFile -Append 248 | $script:LogQueue.Dequeue() | Out-Null 249 | } 250 | } 251 | catch { 252 | } 253 | finally { 254 | if ($script:LogQueueIsLocked -eq $true) { 255 | [System.Threading.Monitor]::Exit($script:LogQueue.SyncRoot) 256 | $script:LogQueueIsLocked = $false 257 | } 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /MyTools/MyTools.psm1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Computer info Stuff from Places. 4 | .EXAMPLE 5 | Get-CompInfo -computername localhost 6 | .EXAMPLE 7 | Get-CompInfo -comp one,two,three 8 | .EXAMPLE 9 | get-content names.txt | get-CompINfo 10 | .PARAMETER computername 11 | One or more computer names. Or IP Address's. Whatever.. 12 | .DESCRIPTION 13 | Using a wmi query this retrieves the Bios Serial Number, Computer Name, Model, OSVersion, Manufactuerer 14 | #> 15 | function Get-OSInfo { 16 | [CmdletBinding()] 17 | param ( 18 | [Parameter(Mandatory=$true,ValueFromPipeline=$True)] 19 | [string[]] $ComputerName, 20 | [string] $errorlogpath = "c:\temp\oops.txt" 21 | ) 22 | 23 | BEGIN{} 24 | PROCESS{ 25 | foreach ($computer in $ComputerName){ 26 | Write-Verbose "About to Query $computer" 27 | Write-Debug "$computer is next..." 28 | try{ 29 | $everything_ok = $true 30 | $os = Get-WmiObject -Class win32_operatingsystem -ComputerName $computer ` 31 | -ErrorVariable MyErr -ErrorAction Stop 32 | } 33 | catch { 34 | $everything_ok = $false 35 | Write-Verbose "$computer failed, boss. Logging to $errorlogpath" 36 | Write-Verbose "Error was $MyErr" 37 | $computer | out-file $errorlogpath -Append 38 | } 39 | if($everything_ok) { 40 | $bios = Get-WmiObject -Class win32_bios -ComputerName $computer 41 | $cs = Get-WmiObject -Class win32_computersystem -ComputerName $computer 42 | $props = @{'ComputerName' = $computer; 43 | 'OSVersion'= $os.version; 44 | 'BIOSSerial' = $bios.serialnumber; 45 | 'Model' = $cs.model; 46 | 'Manufacturer' = $cs.manufacturer} 47 | $obj = New-Object -TypeName PSObject -Property $props 48 | Write-Debug "About to spew output..." 49 | Write-Output $obj 50 | } 51 | } 52 | } 53 | END {} 54 | } -------------------------------------------------------------------------------- /NetShell/NetShell.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/NetShell/NetShell.psd1 -------------------------------------------------------------------------------- /NetShell/NetShell.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/NetShell/NetShell.psm1 -------------------------------------------------------------------------------- /NetworkScan/NetworkScan.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | 3 | # Script module or binary module file associated with this manifest 4 | ModuleToProcess = 'NetworkScan' 5 | 6 | # Version number of this module. 7 | ModuleVersion = '1.0.1.0' 8 | 9 | # ID used to uniquely identify this module 10 | GUID = '{d4dba74f-b4b6-46e8-b6aa-1ba66775f3ea}' 11 | 12 | # Author of this module 13 | Author = 'Kendal Van Dyke' 14 | 15 | # Company or vendor of this module 16 | CompanyName = 'Kendal Van Dyke' 17 | 18 | # Copyright statement for this module 19 | Copyright = '(c) 2013. All rights reserved.' 20 | 21 | # Description of the functionality provided by this module 22 | Description = 'Tools to discover hosts on an IPv4 network' 23 | 24 | # Minimum version of the Windows PowerShell engine required by this module 25 | PowerShellVersion = '2.0' 26 | 27 | # Minimum version of the .NET Framework required by this module 28 | DotNetFrameworkVersion = '2.0' 29 | 30 | # Minimum version of the common language runtime (CLR) required by this module 31 | CLRVersion = '2.0.50727' 32 | 33 | # Processor architecture (None, X86, Amd64, IA64) required by this module 34 | ProcessorArchitecture = 'None' 35 | 36 | # Modules that must be imported into the global environment prior to importing 37 | # this module 38 | RequiredModules = @() 39 | 40 | # Assemblies that must be loaded prior to importing this module 41 | RequiredAssemblies = @() 42 | 43 | # Script files (.ps1) that are run in the caller's environment prior to 44 | # importing this module 45 | ScriptsToProcess = @() 46 | 47 | # Type files (.ps1xml) to be loaded when importing this module 48 | TypesToProcess = @() 49 | 50 | # Format files (.ps1xml) to be loaded when importing this module 51 | FormatsToProcess = @() 52 | 53 | # Modules to import as nested modules of the module specified in 54 | # ModuleToProcess 55 | NestedModules = @('NetShell') 56 | 57 | # Functions to export from this module 58 | FunctionsToExport = @('Find-IPv4Device','Find-SqlServerService') 59 | 60 | # Cmdlets to export from this module 61 | #CmdletsToExport = '*' 62 | CmdletsToExport = @() 63 | 64 | # Variables to export from this module 65 | #VariablesToExport = '*' 66 | VariablesToExport = @() 67 | 68 | # Aliases to export from this module 69 | #AliasesToExport = '*' 70 | AliasesToExport = @() 71 | 72 | # List of all modules packaged with this module 73 | ModuleList = @() 74 | 75 | # List of all files packaged with this module 76 | FileList = 'NetworkScan.psm1' 77 | 78 | # Private data to pass to the module specified in ModuleToProcess 79 | PrivateData = @{} 80 | 81 | } -------------------------------------------------------------------------------- /OrchestratorServieModule/OrchWebService.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/OrchWebService.pptx -------------------------------------------------------------------------------- /OrchestratorServieModule/OrchestratorServiceModule.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/OrchestratorServiceModule.psm1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-GetCollection.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-GetCollection.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-GetInstance.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-GetInstance.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-GetInstanceDetails.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-GetInstanceDetails.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-GetJob.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-GetJob.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-GetRunbook.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-GetRunbook.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-StartRunbook.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-StartRunbook.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-StartRunbookAndGetInstanceDetails.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-StartRunbookAndGetInstanceDetails.ps1 -------------------------------------------------------------------------------- /OrchestratorServieModule/Test-StopJob.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/OrchestratorServieModule/Test-StopJob.ps1 -------------------------------------------------------------------------------- /PSDiagnostics/Construct-PSRemoteDataObject.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSDiagnostics/Construct-PSRemoteDataObject.ps1 -------------------------------------------------------------------------------- /PSDiagnostics/psdiagdemo.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSDiagnostics/psdiagdemo.ps1 -------------------------------------------------------------------------------- /PSFTP/Add-FTPItem.ps1: -------------------------------------------------------------------------------- 1 | Function Add-FTPItem 2 | { 3 | <# 4 | .SYNOPSIS 5 | Send file to specific ftp location. 6 | 7 | .DESCRIPTION 8 | The Add-FTPItem cmdlet send file to specific location on ftp server. 9 | 10 | .PARAMETER Path 11 | Specifies a path to ftp location. 12 | 13 | .PARAMETER LocalPath 14 | Specifies a local path. 15 | 16 | .PARAMETER BufferSize 17 | Specifies size of buffer. Default is 20KB. 18 | 19 | .PARAMETER Session 20 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 21 | 22 | .PARAMETER Overwrite 23 | Overwrite item on remote location. 24 | 25 | .EXAMPLE 26 | PS> Add-FTPItem -Path "/myfolder" -LocalPath "C:\myFile.txt" 27 | 28 | Dir : - 29 | Right : rw-r--r-- 30 | Ln : 1 31 | User : ftp 32 | Group : ftp 33 | Size : 82033 34 | ModifiedDate : Aug 17 12:27 35 | Name : myFile.txt 36 | 37 | .NOTES 38 | Author: Michal Gajda 39 | Blog : http://commandlinegeeks.com/ 40 | 41 | .LINK 42 | Get-FTPChildItem 43 | #> 44 | 45 | [CmdletBinding( 46 | SupportsShouldProcess=$True, 47 | ConfirmImpact="Low" 48 | )] 49 | Param( 50 | [String]$Path = "", 51 | [parameter(Mandatory=$true)] 52 | [String]$LocalPath, 53 | [Int]$BufferSize = 20KB, 54 | [String]$Session = "DefaultFTPSession", 55 | [Switch]$Overwrite = $false 56 | ) 57 | 58 | Begin{} 59 | 60 | Process 61 | { 62 | $CurrentSession = Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue -ValueOnly 63 | 64 | if(Test-Path $LocalPath) 65 | { 66 | if($Path -match "ftp://") 67 | { 68 | $RequestUri = $Path+"/"+(Get-Item $LocalPath).Name 69 | } 70 | else 71 | { 72 | $RequestUri = $CurrentSession.RequestUri.OriginalString+"/"+$Path+"/"+(Get-Item $LocalPath).Name 73 | } 74 | $RequestUri = [regex]::Replace($RequestUri, '/+', '/') 75 | $RequestUri = [regex]::Replace($RequestUri, '^ftp:/', 'ftp://') 76 | 77 | if ($pscmdlet.ShouldProcess($RequestUri,"Send item: '$LocalPath' in ftp location")) 78 | { 79 | if($CurrentSession -ne $null) 80 | { 81 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($RequestUri) 82 | $Request.Credentials = $CurrentSession.Credentials 83 | $Request.EnableSsl = $CurrentSession.EnableSsl 84 | $Request.KeepAlive = $CurrentSession.KeepAlive 85 | $Request.UseBinary = $CurrentSession.UseBinary 86 | $Request.UsePassive = $CurrentSession.UsePassive 87 | 88 | Try 89 | { 90 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$CurrentSession.ignoreCert} 91 | 92 | $SendFlag = 1 93 | if($Overwrite -eq $false) 94 | { 95 | if((Get-FTPChildItem -Path $RequestUri).Name) 96 | { 97 | $FileSize = Get-FTPItemSize -Path $RequestUri -Silent 98 | 99 | $Title = "A File name already exists in this location." 100 | $Message = "What do you want to do?" 101 | 102 | $ChoiceOverwrite = New-Object System.Management.Automation.Host.ChoiceDescription "&Overwrite" 103 | $ChoiceCancel = New-Object System.Management.Automation.Host.ChoiceDescription "&Cancel" 104 | if($FileSize -lt (Get-Item -Path $LocalPath).Length) 105 | { 106 | $ChoiceResume = New-Object System.Management.Automation.Host.ChoiceDescription "&Resume" 107 | $Options = [System.Management.Automation.Host.ChoiceDescription[]]($ChoiceCancel, $ChoiceOverwrite, $ChoiceResume) 108 | $SendFlag = $host.ui.PromptForChoice($Title, $Message, $Options, 2) 109 | } 110 | else 111 | { 112 | $Options = [System.Management.Automation.Host.ChoiceDescription[]]($ChoiceCancel, $ChoiceOverwrite) 113 | $SendFlag = $host.ui.PromptForChoice($Title, $Message, $Options, 1) 114 | } 115 | } 116 | } 117 | 118 | if($SendFlag -eq 2) 119 | { 120 | $Request.Method = [System.Net.WebRequestMethods+FTP]::AppendFile 121 | } 122 | else 123 | { 124 | $Request.Method = [System.Net.WebRequestMethods+FTP]::UploadFile 125 | } 126 | 127 | if($SendFlag) 128 | { 129 | $File = [IO.File]::OpenRead( (Convert-Path $LocalPath) ) 130 | 131 | $Response = $Request.GetRequestStream() 132 | [Byte[]]$Buffer = New-Object Byte[] $BufferSize 133 | 134 | $ReadedData = 0 135 | $AllReadedData = 0 136 | $TotalData = (Get-Item $LocalPath).Length 137 | 138 | if($SendFlag -eq 2) 139 | { 140 | $SeekOrigin = [System.IO.SeekOrigin]::Begin 141 | $File.Seek($FileSize,$SeekOrigin) | Out-Null 142 | $AllReadedData = $FileSize 143 | } 144 | 145 | if($TotalData -eq 0) 146 | { 147 | $TotalData = 1 148 | } 149 | 150 | Do { 151 | $ReadedData = $File.Read($Buffer, 0, $Buffer.Length) 152 | $AllReadedData += $ReadedData 153 | $Response.Write($Buffer, 0, $ReadedData); 154 | Write-Progress -Activity "Upload File: $Path" -Status "Uploading:" -Percentcomplete ([int]($AllReadedData/$TotalData * 100)) 155 | } While($ReadedData -gt 0) 156 | 157 | $File.Close() 158 | $Response.Close() 159 | 160 | Return Get-FTPChildItem -Path $RequestUri 161 | } 162 | 163 | } 164 | Catch 165 | { 166 | $Error = $_.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 167 | Write-Error $Error -ErrorAction Stop 168 | } 169 | } 170 | else 171 | { 172 | Write-Warning "First use Set-FTPConnection to config FTP connection." 173 | } 174 | } 175 | } 176 | else 177 | { 178 | Write-Error "Cannot find local path '$LocalPath' because it does not exist." -ErrorAction Stop 179 | } 180 | } 181 | 182 | End{} 183 | } -------------------------------------------------------------------------------- /PSFTP/Get-FTPItem.ps1: -------------------------------------------------------------------------------- 1 | Function Get-FTPItem 2 | { 3 | <# 4 | .SYNOPSIS 5 | Send specific file from ftop server to location disk. 6 | 7 | .DESCRIPTION 8 | The Get-FTPItem cmdlet download file to specific location on local machine. 9 | 10 | .PARAMETER Path 11 | Specifies a path to ftp location. 12 | 13 | .PARAMETER LocalPath 14 | Specifies a local path. 15 | 16 | .PARAMETER RecreateFolders 17 | Recreate locally folders structure from ftp server. 18 | 19 | .PARAMETER BufferSize 20 | Specifies size of buffer. Default is 20KB. 21 | 22 | .PARAMETER Session 23 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 24 | 25 | .EXAMPLE 26 | PS P:\> Get-FTPItem -Path ftp://ftp.contoso.com/folder/subfolder1/test.xlsx -LocalPath P:\test 27 | 226 File send OK. 28 | 29 | PS P:\> Get-FTPItem -Path ftp://ftp.contoso.com/folder/subfolder1/test.xlsx -LocalPath P:\test 30 | 31 | A File name already exists in location: P:\test 32 | What do you want to do? 33 | [C] Cancel [O] Overwrite [?] Help (default is "O"): O 34 | 226 File send OK. 35 | 36 | .EXAMPLE 37 | PS P:\> Get-FTPChildItem -path folder/subfolder1 -Recurse | Get-FTPItem -localpath p:\test -RecreateFolders -Verbose 38 | VERBOSE: Performing operation "Download item: 'ftp://ftp.contoso.com/folder/subfolder1/test.xlsx'" on Target "p:\test\folder\subfolder1". 39 | VERBOSE: Creating folder: folder\subfolder1 40 | 226 File send OK. 41 | 42 | VERBOSE: Performing operation "Download item: 'ftp://ftp.contoso.com/folder/subfolder1/ziped.zip'" on Target "p:\test\folder\subfolder1". 43 | 226 File send OK. 44 | 45 | VERBOSE: Performing operation "Download item: 'ftp://ftp.contoso.com/folder/subfolder1/subfolder11/ziped.zip'" on Target "p:\test\folder\subfolder1\subfolder11". 46 | VERBOSE: Creating folder: folder\subfolder1\subfolder11 47 | 226 File send OK. 48 | 49 | .NOTES 50 | Author: Michal Gajda 51 | Blog : http://commandlinegeeks.com/ 52 | 53 | .LINK 54 | Get-FTPChildItem 55 | #> 56 | 57 | [CmdletBinding( 58 | SupportsShouldProcess=$True, 59 | ConfirmImpact="Low" 60 | )] 61 | Param( 62 | [parameter(Mandatory=$true, 63 | ValueFromPipelineByPropertyName=$true, 64 | ValueFromPipeline=$true)] 65 | [Alias("FullName")] 66 | [String]$Path = "", 67 | [String]$LocalPath = (Get-Location).Path, 68 | [Switch]$RecreateFolders, 69 | [Int]$BufferSize = 20KB, 70 | [String]$Session = "DefaultFTPSession" 71 | ) 72 | 73 | Begin{} 74 | 75 | Process 76 | { 77 | $CurrentSession = Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue -ValueOnly 78 | if($Path -match "ftp://") 79 | { 80 | $RequestUri = $Path 81 | } 82 | else 83 | { 84 | $RequestUri = $CurrentSession.RequestUri.OriginalString+"/"+$Path 85 | } 86 | $RequestUri = [regex]::Replace($RequestUri, '/+', '/') 87 | $RequestUri = [regex]::Replace($RequestUri, '^ftp:/', 'ftp://') 88 | 89 | $TotalData = Get-FTPItemSize $RequestUri -Silent 90 | if($TotalData -eq -1) { Return } 91 | if($TotalData -eq 0) { $TotalData = 1 } 92 | 93 | $AbsolutePath = ($RequestUri -split $CurrentSession.ServicePoint.Address.AbsoluteUri)[1] 94 | $LastIndex = $AbsolutePath.LastIndexOf("/") 95 | $ServerPath = $CurrentSession.ServicePoint.Address.AbsoluteUri 96 | if($LastIndex -eq -1) 97 | { 98 | $FolderPath = "\" 99 | } 100 | else 101 | { 102 | $FolderPath = $AbsolutePath.SubString(0,$LastIndex) -replace "/","\" 103 | } 104 | $FileName = $AbsolutePath.SubString($LastIndex+1) 105 | 106 | if($RecreateFolders) 107 | { 108 | if(!(Test-Path (Join-Path -Path $LocalPath -ChildPath $FolderPath))) 109 | { 110 | Write-Verbose "Creating folder: $FolderPath" 111 | New-Item -Type Directory -Path $LocalPath -Name $FolderPath | Out-Null 112 | } 113 | $LocalDir = Join-Path -Path $LocalPath -ChildPath $FolderPath 114 | } 115 | else 116 | { 117 | $LocalDir = $LocalPath 118 | } 119 | 120 | if ($pscmdlet.ShouldProcess($LocalDir,"Download item: '$RequestUri'")) 121 | { 122 | if($CurrentSession -ne $null) 123 | { 124 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($RequestUri) 125 | $Request.Credentials = $CurrentSession.Credentials 126 | $Request.EnableSsl = $CurrentSession.EnableSsl 127 | $Request.KeepAlive = $CurrentSession.KeepAlive 128 | $Request.UseBinary = $CurrentSession.UseBinary 129 | $Request.UsePassive = $CurrentSession.UsePassive 130 | 131 | $Request.Method = [System.Net.WebRequestMethods+FTP]::DownloadFile 132 | Try 133 | { 134 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$CurrentSession.ignoreCert} 135 | $SendFlag = 1 136 | 137 | if((Get-ItemProperty $LocalDir -ErrorAction SilentlyContinue).Attributes -match "Directory") 138 | { 139 | $LocalDir = Join-Path -Path $LocalDir -ChildPath $FileName 140 | } 141 | 142 | if(Test-Path ($LocalDir)) 143 | { 144 | $FileSize = (Get-Item $LocalDir).Length 145 | 146 | $Title = "A file ($RequestUri) already exists in location: $LocalDir" 147 | $Message = "What do you want to do?" 148 | 149 | $Overwrite = New-Object System.Management.Automation.Host.ChoiceDescription "&Overwrite" 150 | $Cancel = New-Object System.Management.Automation.Host.ChoiceDescription "&Cancel" 151 | if($FileSize -lt $TotalData) 152 | { 153 | $Resume = New-Object System.Management.Automation.Host.ChoiceDescription "&Resume" 154 | $Options = [System.Management.Automation.Host.ChoiceDescription[]]($Cancel, $Overwrite, $Resume) 155 | $SendFlag = $host.ui.PromptForChoice($Title, $Message, $Options, 2) 156 | } 157 | else 158 | { 159 | $Options = [System.Management.Automation.Host.ChoiceDescription[]]($Cancel, $Overwrite) 160 | $SendFlag = $host.ui.PromptForChoice($Title, $Message, $Options, 1) 161 | } 162 | } 163 | 164 | if($SendFlag) 165 | { 166 | [Byte[]]$Buffer = New-Object Byte[] $BufferSize 167 | 168 | $ReadedData = 0 169 | $AllReadedData = 0 170 | 171 | if($SendFlag -eq 2) 172 | { 173 | $File = New-Object IO.FileStream ($LocalDir,[IO.FileMode]::Append) 174 | $Request.UseBinary = $True 175 | $Request.ContentOffset = $FileSize 176 | $AllReadedData = $FileSize 177 | } 178 | else 179 | { 180 | $File = New-Object IO.FileStream ($LocalDir,[IO.FileMode]::Create) 181 | } 182 | 183 | $Response = $Request.GetResponse() 184 | $Stream = $Response.GetResponseStream() 185 | 186 | Do{ 187 | $ReadedData=$Stream.Read($Buffer,0,$Buffer.Length) 188 | $AllReadedData +=$ReadedData 189 | $File.Write($Buffer,0,$ReadedData) 190 | Write-Progress -Activity "Download File: $Path" -Status "Downloading:" -Percentcomplete ([int]($AllReadedData/$TotalData * 100)) 191 | } 192 | While ($ReadedData -ne 0) 193 | $File.Close() 194 | 195 | $Status = $Response.StatusDescription 196 | $Response.Close() 197 | Return $Status 198 | } 199 | } 200 | Catch 201 | { 202 | $Error = $_#.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 203 | Write-Error $Error -ErrorAction Stop 204 | } 205 | } 206 | else 207 | { 208 | Write-Warning "First use Set-FTPConnection to config FTP connection." 209 | } 210 | } 211 | } 212 | 213 | End{} 214 | } -------------------------------------------------------------------------------- /PSFTP/Get-FTPItemSize.ps1: -------------------------------------------------------------------------------- 1 | Function Get-FTPItemSize 2 | { 3 | <# 4 | .SYNOPSIS 5 | Gets the item size. 6 | 7 | .DESCRIPTION 8 | The Get-FTPItemSize cmdlet gets the specific item size. 9 | 10 | .PARAMETER Path 11 | Specifies a path to ftp location. 12 | 13 | .PARAMETER Silent 14 | Hide warnings. 15 | 16 | .PARAMETER Session 17 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 18 | 19 | .EXAMPLE 20 | PS> Get-FTPItemSize -Path "/myFolder/myFile.txt" 21 | 82033 22 | 23 | .NOTES 24 | Author: Michal Gajda 25 | Blog : http://commandlinegeeks.com/ 26 | 27 | .LINK 28 | Get-FTPChildItem 29 | #> 30 | 31 | [CmdletBinding( 32 | SupportsShouldProcess=$True, 33 | ConfirmImpact="Low" 34 | )] 35 | Param( 36 | [parameter(Mandatory=$true)] 37 | [String]$Path = "", 38 | [Switch]$Silent = $False, 39 | [String]$Session = "DefaultFTPSession" 40 | ) 41 | 42 | Begin{} 43 | 44 | Process 45 | { 46 | $CurrentSession = Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue -ValueOnly 47 | if($Path -match "ftp://") 48 | { 49 | $RequestUri = $Path 50 | } 51 | else 52 | { 53 | $RequestUri = $CurrentSession.RequestUri.OriginalString+"/"+$Path 54 | } 55 | $RequestUri = [regex]::Replace($RequestUri, '/+', '/') 56 | $RequestUri = [regex]::Replace($RequestUri, '^ftp:/', 'ftp://') 57 | 58 | if ($pscmdlet.ShouldProcess($RequestUri,"Get item size")) 59 | { 60 | if($CurrentSession -ne $null) 61 | { 62 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($RequestUri) 63 | $Request.Credentials = $CurrentSession.Credentials 64 | $Request.EnableSsl = $CurrentSession.EnableSsl 65 | $Request.KeepAlive = $CurrentSession.KeepAlive 66 | $Request.UseBinary = $CurrentSession.UseBinary 67 | $Request.UsePassive = $CurrentSession.UsePassive 68 | 69 | $Request.Method = [System.Net.WebRequestMethods+FTP]::GetFileSize 70 | Try 71 | { 72 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$CurrentSession.ignoreCert} 73 | $Response = $Request.GetResponse() 74 | 75 | $Status = $Response.ContentLength 76 | $Response.Close() 77 | Return $Status 78 | } 79 | Catch 80 | { 81 | if(!$Silent) 82 | { 83 | $Error = $_.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 84 | Write-Error $Error -ErrorAction Stop 85 | } 86 | Return -1 87 | } 88 | } 89 | else 90 | { 91 | if(!$Silent) 92 | { 93 | Write-Warning "First use Set-FTPConnection to config FTP connection." 94 | } 95 | } 96 | } 97 | } 98 | 99 | End{} 100 | } -------------------------------------------------------------------------------- /PSFTP/New-FTPItem.ps1: -------------------------------------------------------------------------------- 1 | Function New-FTPItem 2 | { 3 | <# 4 | .SYNOPSIS 5 | Creates a new folder on ftp. 6 | 7 | .DESCRIPTION 8 | The New-FTPItem cmdlet creates a new folder in specific path in current ftp session. 9 | 10 | .PARAMETER Path 11 | Specifies a path to ftp location or file. 12 | 13 | .PARAMETER Name 14 | Specifies a name of item. 15 | 16 | .PARAMETER Session 17 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 18 | 19 | .EXAMPLE 20 | PS> New-FTPItem -Name "myfolder" 21 | 257 "/mg/myfolder" created 22 | 23 | .NOTES 24 | Author: Michal Gajda 25 | Blog : http://commandlinegeeks.com/ 26 | 27 | .LINK 28 | Get-FTPChildItem 29 | #> 30 | 31 | [CmdletBinding( 32 | SupportsShouldProcess=$True, 33 | ConfirmImpact="Low" 34 | )] 35 | Param( 36 | [String]$Path = "", 37 | [parameter(Mandatory=$true)] 38 | [String]$Name, 39 | [String]$Session = "DefaultFTPSession" 40 | ) 41 | 42 | Begin{} 43 | 44 | Process 45 | { 46 | $CurrentSession = Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue -ValueOnly 47 | if($Path -match "ftp://") 48 | { 49 | $RequestUri = $Path+"/"+$Name 50 | } 51 | else 52 | { 53 | $RequestUri = $CurrentSession.RequestUri.OriginalString+"/"+$Path+"/"+$Name 54 | } 55 | $RequestUri = [regex]::Replace($RequestUri, '/+', '/') 56 | $RequestUri = [regex]::Replace($RequestUri, '^ftp:/', 'ftp://') 57 | 58 | if ($pscmdlet.ShouldProcess($RequestUri,"Create new folder: '$Name' in ftp location")) 59 | { 60 | if($CurrentSession -ne $null) 61 | { 62 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($RequestUri) 63 | $Request.Credentials = $CurrentSession.Credentials 64 | $Request.EnableSsl = $CurrentSession.EnableSsl 65 | $Request.KeepAlive = $CurrentSession.KeepAlive 66 | $Request.UseBinary = $CurrentSession.UseBinary 67 | $Request.UsePassive = $CurrentSession.UsePassive 68 | 69 | $Request.Method = [System.Net.WebRequestMethods+FTP]::MakeDirectory 70 | Try 71 | { 72 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$CurrentSession.ignoreCert} 73 | $Response = $Request.GetResponse() 74 | 75 | $Status = $Response.StatusDescription 76 | $Response.Close() 77 | Return $Status 78 | } 79 | Catch 80 | { 81 | $Error = $_.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 82 | Write-Error $Error -ErrorAction Stop 83 | } 84 | } 85 | else 86 | { 87 | Write-Warning "First use Set-FTPConnection to config FTP connection." 88 | } 89 | } 90 | } 91 | 92 | End{} 93 | } -------------------------------------------------------------------------------- /PSFTP/PSFTP.Format.ps1xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PSFTP.Item 6 | 7 | PSFTP.Item 8 | 9 | 10 | Parent 11 | 12 | 13 | 14 | 15 | 16 | 3 17 | 18 | 19 | 9 20 | 21 | 22 | 3 23 | 24 | 25 | 6 26 | 27 | 28 | 6 29 | 30 | 31 | 6 32 | 33 | 34 | 19 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | Dir 43 | 44 | 45 | Right 46 | 47 | 48 | Ln 49 | 50 | 51 | User 52 | 53 | 54 | Group 55 | 56 | 57 | Size 58 | 59 | 60 | ModifiedDate 61 | 62 | 63 | Name 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /PSFTP/PSFTP.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSFTP/PSFTP.psd1 -------------------------------------------------------------------------------- /PSFTP/PSFTP.psm1: -------------------------------------------------------------------------------- 1 | Get-ChildItem -Path $PSScriptRoot\*.ps1 | Foreach-Object{ . $_.FullName } 2 | 3 | New-Alias Send-FTPItem Add-FTPItem 4 | New-Alias Receive-FTPItem Get-FTPItem 5 | 6 | Export-ModuleMember -Function * -Alias * -------------------------------------------------------------------------------- /PSFTP/Remove-FTPItem.ps1: -------------------------------------------------------------------------------- 1 | Function Remove-FTPItem 2 | { 3 | <# 4 | .SYNOPSIS 5 | Remove specific item from ftp server. 6 | 7 | .DESCRIPTION 8 | The Remove-FTPItem cmdlet remove item from specific location on ftp server. 9 | 10 | .PARAMETER Path 11 | Specifies a path to ftp location. 12 | 13 | .PARAMETER Recurse 14 | Remove items recursively. 15 | 16 | .PARAMETER Session 17 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 18 | 19 | .EXAMPLE 20 | PS> Remove-FTPItem -Path "/myFolder" -Recurse 21 | ->Remove Dir: /myFolder/mySubFolder 22 | 250 Remove directory operation successful. 23 | 24 | ->Remove Dir: /myFolder 25 | 250 Remove directory operation successful. 26 | 27 | .NOTES 28 | Author: Michal Gajda 29 | Blog : http://commandlinegeeks.com/ 30 | 31 | .LINK 32 | Get-FTPChildItem 33 | #> 34 | 35 | [CmdletBinding( 36 | SupportsShouldProcess=$True, 37 | ConfirmImpact="Low" 38 | )] 39 | Param( 40 | [parameter(Mandatory=$true)] 41 | [String]$Path = "", 42 | [Switch]$Recurse = $False, 43 | [String]$Session = "DefaultFTPSession" 44 | ) 45 | 46 | Begin{} 47 | 48 | Process 49 | { 50 | $CurrentSession = Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue -ValueOnly 51 | if($Path -match "ftp://") 52 | { 53 | $RequestUri = $Path 54 | } 55 | else 56 | { 57 | $RequestUri = $CurrentSession.RequestUri.OriginalString+"/"+$Path 58 | } 59 | $RequestUri = [regex]::Replace($RequestUri, '/+', '/') 60 | $RequestUri = [regex]::Replace($RequestUri, '^ftp:/', 'ftp://') 61 | 62 | if ($pscmdlet.ShouldProcess($RequestUri,"Remove item from ftp location")) 63 | { 64 | if($CurrentSession -ne $null) 65 | { 66 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($RequestUri) 67 | $Request.Credentials = $CurrentSession.Credentials 68 | $Request.EnableSsl = $CurrentSession.EnableSsl 69 | $Request.KeepAlive = $CurrentSession.KeepAlive 70 | $Request.UseBinary = $CurrentSession.UseBinary 71 | $Request.UsePassive = $CurrentSession.UsePassive 72 | 73 | if((Get-FTPItemSize -Path $RequestUri -Silent) -ge 0) 74 | { 75 | $Request.Method = [System.Net.WebRequestMethods+FTP]::DeleteFile 76 | "->Remove File: $RequestUri" 77 | } 78 | else 79 | { 80 | $Request.Method = [System.Net.WebRequestMethods+FTP]::RemoveDirectory 81 | 82 | $SubItems = Get-FTPChildItem -Path $RequestUri 83 | if($SubItems) 84 | { 85 | $RemoveFlag = 0 86 | if(!$Recurse) 87 | { 88 | $Title = "Remove recurse" 89 | $Message = "Do you want to recurse remove items from location?" 90 | 91 | $Yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes" 92 | $No = New-Object System.Management.Automation.Host.ChoiceDescription "&No" 93 | $Options = [System.Management.Automation.Host.ChoiceDescription[]]($No, $Yes) 94 | 95 | $RemoveFlag = $host.ui.PromptForChoice($Title, $Message, $Options, 0) 96 | } 97 | else 98 | { 99 | $RemoveFlag = 1 100 | } 101 | 102 | if($RemoveFlag) 103 | { 104 | Foreach($SubItem in $SubItems) 105 | { 106 | Remove-FTPItem -Path ($RequestUri+"/"+$SubItem.Name.Trim()) -Recurse 107 | } 108 | } 109 | else 110 | { 111 | Return 112 | } 113 | } 114 | "->Remove Dir: $RequestUri" 115 | } 116 | 117 | Try 118 | { 119 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$CurrentSession.ignoreCert} 120 | $Response = $Request.GetResponse() 121 | 122 | $Status = $Response.StatusDescription 123 | $Response.Close() 124 | Return $Status 125 | } 126 | Catch 127 | { 128 | $Error = $_.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 129 | Write-Error $Error -ErrorAction Stop 130 | } 131 | } 132 | else 133 | { 134 | Write-Warning "First use Set-FTPConnection to config FTP connection." 135 | } 136 | } 137 | } 138 | 139 | End{} 140 | } -------------------------------------------------------------------------------- /PSFTP/Rename-FTPItem.ps1: -------------------------------------------------------------------------------- 1 | Function Rename-FTPItem 2 | { 3 | <# 4 | .SYNOPSIS 5 | Renames an item in ftp session. 6 | 7 | .DESCRIPTION 8 | The Rename-FTPItem cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed. 9 | 10 | .PARAMETER Path 11 | Specifies a path to ftp item. 12 | 13 | .PARAMETER NewName 14 | Specifies a new name of ftp item. 15 | 16 | .PARAMETER Session 17 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 18 | 19 | .EXAMPLE 20 | PS> Rename-FTPItem -Path "/myfolder" -NewName "myNewFolder" 21 | 250 Rename successful. 22 | 23 | .NOTES 24 | Author: Michal Gajda 25 | Blog : http://commandlinegeeks.com/ 26 | 27 | .LINK 28 | Get-FTPChildItem 29 | #> 30 | 31 | [CmdletBinding( 32 | SupportsShouldProcess=$True, 33 | ConfirmImpact="Low" 34 | )] 35 | Param( 36 | [String]$Path = "", 37 | [parameter(Mandatory=$true)] 38 | [String]$NewName, 39 | [String]$Session = "DefaultFTPSession" 40 | ) 41 | 42 | Begin{} 43 | 44 | Process 45 | { 46 | $CurrentSession = Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue -ValueOnly 47 | if($Path -match "ftp://") 48 | { 49 | $RequestUri = $Path 50 | } 51 | else 52 | { 53 | $RequestUri = $CurrentSession.RequestUri.OriginalString+"/"+$Path 54 | } 55 | $RequestUri = [regex]::Replace($RequestUri, '/+', '/') 56 | $RequestUri = [regex]::Replace($RequestUri, '^ftp:/', 'ftp://') 57 | 58 | if ($pscmdlet.ShouldProcess($RequestUri,"Rename item to: '$NewName' in ftp location")) 59 | { 60 | if($CurrentSession -ne $null) 61 | { 62 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($RequestUri) 63 | $Request.Credentials = $CurrentSession.Credentials 64 | $Request.EnableSsl = $CurrentSession.EnableSsl 65 | $Request.KeepAlive = $CurrentSession.KeepAlive 66 | $Request.UseBinary = $CurrentSession.UseBinary 67 | $Request.UsePassive = $CurrentSession.UsePassive 68 | $Request.RenameTo = $NewName 69 | 70 | $Request.Method = [System.Net.WebRequestMethods+FTP]::Rename 71 | Try 72 | { 73 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$CurrentSession.ignoreCert} 74 | $Response = $Request.GetResponse() 75 | 76 | $Status = $Response.StatusDescription 77 | $Response.Close() 78 | Return $Status 79 | } 80 | Catch 81 | { 82 | $Error = $_.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 83 | Write-Error $Error -ErrorAction Stop 84 | } 85 | } 86 | else 87 | { 88 | Write-Warning "First use Set-FTPConnection to config FTP connection." 89 | } 90 | } 91 | } 92 | 93 | End{} 94 | } -------------------------------------------------------------------------------- /PSFTP/Set-FTPConnection.ps1: -------------------------------------------------------------------------------- 1 | Function Set-FTPConnection 2 | { 3 | <# 4 | .SYNOPSIS 5 | Set config to ftp Connection. 6 | 7 | .DESCRIPTION 8 | The Set-FTPConnection cmdlet creates a Windows PowerShell configuration to ftp server. When you create a ftp connection, you may run multiple commands that use this config. 9 | 10 | .PARAMETER Credentials 11 | Specifies a user account that has permission to access to ftp location. 12 | 13 | .PARAMETER Server 14 | Specifies the ftp server you want to connect. 15 | 16 | .PARAMETER EnableSsl 17 | Specifies that an SSL connection should be used. 18 | 19 | .PARAMETER ignoreCert 20 | If you use SSL connection you may ignore certificate error. 21 | 22 | .PARAMETER KeepAlive 23 | Specifies whether the control connection to the ftp server is closed after the request completes. 24 | 25 | .PARAMETER UseBinary 26 | Specifies the data type for file transfers. 27 | 28 | .PARAMETER UsePassive 29 | Behavior of a client application's data transfer process. 30 | 31 | .PARAMETER Session 32 | Specifies a friendly name for the ftp session. Default session name is 'DefaultFTPSession'. 33 | 34 | .EXAMPLE 35 | 36 | $Credentials = Get-Credential 37 | Set-FTPConnection -Credentials $Credentials -Server ftp://myftpserver.com -EnableSsl -ignoreCert -UsePassive 38 | 39 | ContentLength : -1 40 | Headers : {} 41 | ResponseUri : ftp://myftpserver.com/ 42 | StatusCode : ClosingData 43 | StatusDescription : 226 Directory send OK. 44 | 45 | LastModified : 0001-01-01 00:00:00 46 | BannerMessage : 220 Welcome to FTP service. 47 | 48 | WelcomeMessage : 230 Login successful. 49 | 50 | ExitMessage : 221 Goodbye. 51 | 52 | IsFromCache : False 53 | IsMutuallyAuthenticated : False 54 | ContentType : 55 | 56 | .NOTES 57 | Author: Michal Gajda 58 | Blog : http://commandlinegeeks.com/ 59 | 60 | .LINK 61 | Get-FTPChildItem 62 | #> 63 | 64 | [CmdletBinding( 65 | SupportsShouldProcess=$True, 66 | ConfirmImpact="Low" 67 | )] 68 | Param( 69 | [parameter(Mandatory=$true)] 70 | [System.Net.NetworkCredential]$Credentials, 71 | [parameter(Mandatory=$true)] 72 | [String]$Server, 73 | [Switch]$EnableSsl = $False, 74 | [Switch]$ignoreCert = $False, 75 | [Switch]$KeepAlive = $False, 76 | [Switch]$UseBinary = $False, 77 | [Switch]$UsePassive = $False, 78 | [String]$Session = "DefaultFTPSession" 79 | ) 80 | 81 | Begin{} 82 | 83 | Process 84 | { 85 | if ($pscmdlet.ShouldProcess($Server,"Connect to FTP Server")) 86 | { 87 | if(!($Server -match "ftp://")) 88 | { 89 | $Server = "ftp://"+$Server 90 | } 91 | 92 | [System.Net.FtpWebRequest]$Request = [System.Net.WebRequest]::Create($Server) 93 | $Request.Credentials = $Credentials 94 | $Request.EnableSsl = $EnableSsl 95 | $Request.KeepAlive = $KeepAlive 96 | $Request.UseBinary = $UseBinary 97 | $Request.UsePassive = $UsePassive 98 | $Request | Add-Member -MemberType NoteProperty -Name ignoreCert -Value $ignoreCert 99 | 100 | $Request.Method = [System.Net.WebRequestMethods+FTP]::ListDirectoryDetails 101 | Try 102 | { 103 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$ignoreCert} 104 | $Response = $Request.GetResponse() 105 | $Response.Close() 106 | 107 | if((Get-Variable -Scope Global -Name $Session -ErrorAction SilentlyContinue) -eq $null) 108 | { 109 | New-Variable -Scope Global -Name $Session -Value $Request 110 | } 111 | else 112 | { 113 | Set-Variable -Scope Global -Name $Session -Value $Request 114 | } 115 | 116 | Return $Response 117 | } 118 | Catch 119 | { 120 | $Error = $_.Exception.Message.Substring(($_.Exception.Message.IndexOf(":")+3),($_.Exception.Message.Length-($_.Exception.Message.IndexOf(":")+5))) 121 | Write-Error $Error -ErrorAction Stop 122 | } 123 | } 124 | } 125 | 126 | End{} 127 | } -------------------------------------------------------------------------------- /PSImageTools/Add-CropFilter.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Add-CropFilter.ps1 -------------------------------------------------------------------------------- /PSImageTools/Add-OverlayFilter.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Add-OverlayFilter.ps1 -------------------------------------------------------------------------------- /PSImageTools/Add-RotateFlipFilter.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Add-RotateFlipFilter.ps1 -------------------------------------------------------------------------------- /PSImageTools/Add-ScaleFilter.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Add-ScaleFilter.ps1 -------------------------------------------------------------------------------- /PSImageTools/Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Background.png -------------------------------------------------------------------------------- /PSImageTools/ConvertTo-Bitmap.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/ConvertTo-Bitmap.ps1 -------------------------------------------------------------------------------- /PSImageTools/ConvertTo-Jpeg.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/ConvertTo-Jpeg.ps1 -------------------------------------------------------------------------------- /PSImageTools/Copy-ImageIntoOrganizedFolder.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Copy-ImageIntoOrganizedFolder.ps1 -------------------------------------------------------------------------------- /PSImageTools/En-US/about_PSImageTools_Module.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_PSImageTools_Module 3 | 4 | SHORT DESCRIPTION 5 | Describes the PSImageTools module in the Windows 7 Resource Kit. 6 | 7 | LONG DESCRIPTION 8 | The PSImageTools module contains functions that manage and edit image files, such 9 | as photographs, in Windows PowerShell. 10 | 11 | The PSImageTools module adds the following basic functions to your session 12 | when you import the module. 13 | 14 | 15 | Get-Image Gets image objects with many useful properties. Provides 16 | methods to load, save, crop, resize, rotate, and flip images. 17 | 18 | Get-ImageProperty Gets extended properties for the image, such as shutter speed 19 | and resolution. 20 | 21 | Copy-ImageIntoOrganizedFolder 22 | Creates a set of folders based on properties that you specify 23 | and copies image files into the folders based on their 24 | property values. 25 | 26 | ConvertTo-Bitmap Converts images to bitmap format (.bmp). 27 | ConvertTo-Jpeg Converts images to JPEG format (.jpg, .jpeg). 28 | 29 | 30 | The PSImageTools module also adds filtering functions to your session. You can use these 31 | more advanced functions to edit images when the basic functions do not provide a feature 32 | that you need. 33 | 34 | The Add-*Filter functions create a Windows Image Acquisition filter that represents a change to one or 35 | more images. The filters alone do not change images. To apply a filter to an image, use 36 | the Set-ImageFilter function. 37 | 38 | Add-CropFilter Creates a filter that crops images. 39 | Add-OverlayFilter Creates a filter that overlays one image on another. 40 | Add-RotateFlipFilter Creates a filter that rotate and flips images. 41 | Add-ScaleFilter Creates a filter that resizes images. 42 | 43 | Set-ImageFilter Edits an image by applying a filter. 44 | 45 | For information about these functions, use the Get-Help cmdlet. For example, 46 | to get detailed help for the Get-Image function, type "get-help get-image -detailed." 47 | 48 | These functions are implemented as scripts, but are available in the 49 | session as functions. 50 | 51 | 52 | SEE ALSO 53 | about_Modules 54 | Get-Module 55 | Import-Module 56 | Remove-Module 57 | 58 | "Image Manipulation in PowerShell" (Windows PowerShell Team Blog) 59 | http://blogs.msdn.com/powershell/archive/2009/03/31/image-manipulation-in-powershell.aspx 60 | 61 | "ImageProcess object" in MSDN 62 | http://msdn.microsoft.com/en-us/library/ms630507(VS.85).aspx 63 | 64 | "How to Use Filters" in MSDN 65 | http://msdn.microsoft.com/en-us/library/ms630819(VS.85).aspx -------------------------------------------------------------------------------- /PSImageTools/En-US/about_PSImageTools_Readme.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/En-US/about_PSImageTools_Readme.help.txt -------------------------------------------------------------------------------- /PSImageTools/Example/FilterImagesInDirectory.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Example/FilterImagesInDirectory.ps1 -------------------------------------------------------------------------------- /PSImageTools/Example/SortByCamera.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Example/SortByCamera.ps1 -------------------------------------------------------------------------------- /PSImageTools/FilterImagesInDirectory.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/FilterImagesInDirectory.ps1 -------------------------------------------------------------------------------- /PSImageTools/Get-Image.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Get-Image.ps1 -------------------------------------------------------------------------------- /PSImageTools/Get-ImageProperty.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Get-ImageProperty.ps1 -------------------------------------------------------------------------------- /PSImageTools/PSImageTools.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/PSImageTools.psd1 -------------------------------------------------------------------------------- /PSImageTools/PSImageTools.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/PSImageTools.psm1 -------------------------------------------------------------------------------- /PSImageTools/Set-ImageFilter.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSImageTools/Set-ImageFilter.ps1 -------------------------------------------------------------------------------- /PSRSS/En-Us/about_PSRSS_Module.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_PSRSS_Module 3 | 4 | SHORT DESCRIPTION 5 | Describes the PSRSS module in the Windows 7 Resource Kit. 6 | 7 | LONG DESCRIPTION 8 | The PSSS module contains functions that manage and edit RSS feeds and the 9 | the articles in the feeds. 10 | 11 | The PSRSS module adds the following functions to your session when you import 12 | the module. 13 | 14 | New-Feed Subscribes to an RSS feed and downloads the articles. 15 | Remove-Feed Unsubscribes to an RSS feed and deletes the articles. 16 | Get-Feed Gets the RSS feeds on your system. 17 | 18 | Get-Article Gets articles in the RSS feeds on your system. 19 | Read-Article Marks articles as read. 20 | Remove-Article Deletes articles from your system. 21 | 22 | 23 | For information about these functions, use the Get-Help cmdlet. For example, 24 | to get detailed help for the Get-Feed function, type "get-help get-feed -detailed." 25 | 26 | The functions in the PSRSS module uses COM based on the the Microsoft.FeedsManager 27 | class in the Windows RSS platform. These functions are implemented as scripts, but 28 | are available in the session as functions. 29 | 30 | 31 | SEE ALSO 32 | about_Modules 33 | Get-Module 34 | Import-Module 35 | Remove-Module 36 | 37 | "Windows RSS Platform": http://msdn.microsoft.com/en-us/library/ms684701(VS.85).aspx 38 | "Microsoft.FeedsManager Object: http://msdn.microsoft.com/en-us/library/ms684749(VS.85).aspx 39 | -------------------------------------------------------------------------------- /PSRSS/En-Us/about_PSRSS_Readme.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/En-Us/about_PSRSS_Readme.help.txt -------------------------------------------------------------------------------- /PSRSS/Get-Article.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/Get-Article.ps1 -------------------------------------------------------------------------------- /PSRSS/Get-Feed.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/Get-Feed.ps1 -------------------------------------------------------------------------------- /PSRSS/New-Feed.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/New-Feed.ps1 -------------------------------------------------------------------------------- /PSRSS/PSRSS.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/PSRSS.psd1 -------------------------------------------------------------------------------- /PSRSS/PSRSS.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/PSRSS.psm1 -------------------------------------------------------------------------------- /PSRSS/Read-Article.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/Read-Article.ps1 -------------------------------------------------------------------------------- /PSRSS/Remove-Article.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/Remove-Article.ps1 -------------------------------------------------------------------------------- /PSRSS/Remove-Feed.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRSS/Remove-Feed.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegBinary.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegBinary.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegDWord.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegDWord.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegDefault.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegDefault.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegExpandString.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegExpandString.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegKey.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegKey.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegMultiString.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegMultiString.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegQWord.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegQWord.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegString.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegString.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Get-RegValue.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Get-RegValue.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/New-RegKey.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/New-RegKey.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/PSFanatic.PSRemoteRegistry.Format.ps1xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PSFanaticRegistryValue 5 | 6 | PSFanatic.Registry.RegistryValue 7 | 8 | 9 | 10 | 11 | 12 | 12 13 | left 14 | 15 | 16 | 17 | 15 18 | left 19 | 20 | 21 | 22 | 20 23 | left 24 | 25 | 26 | 27 | 25 28 | left 29 | 30 | 31 | 32 | 20 33 | left 34 | 35 | 36 | 37 | 12 38 | left 39 | 40 | 41 | 42 | 43 | 44 | 45 | ComputerName 46 | 47 | 48 | Hive 49 | 50 | 51 | Key 52 | 53 | 54 | Value 55 | 56 | 57 | Data 58 | 59 | 60 | Type 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | PSFanaticRegistryKey 69 | 70 | PSFanatic.Registry.RegistryKey 71 | 72 | 73 | 74 | 75 | 76 | 12 77 | left 78 | 79 | 80 | 81 | 15 82 | left 83 | 84 | 85 | 86 | 25 87 | left 88 | 89 | 90 | 91 | 11 92 | left 93 | 94 | 95 | 96 | 10 97 | left 98 | 99 | 100 | 101 | 102 | 103 | 104 | ComputerName 105 | 106 | 107 | Hive 108 | 109 | 110 | Key 111 | 112 | 113 | SubKeyCount 114 | 115 | 116 | ValueCount 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /PSRemoteRegistry/PSRemoteRegistry.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/PSRemoteRegistry.ico -------------------------------------------------------------------------------- /PSRemoteRegistry/PSRemoteRegistry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/PSRemoteRegistry.png -------------------------------------------------------------------------------- /PSRemoteRegistry/PSRemoteRegistry.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/PSRemoteRegistry.psd1 -------------------------------------------------------------------------------- /PSRemoteRegistry/PSRemoteRegistry.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/PSRemoteRegistry.psm1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Remove-RegKey.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Remove-RegKey.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Remove-RegValue.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Remove-RegValue.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegBinary.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegBinary.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegDWord.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegDWord.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegDefault.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegDefault.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegExpandString.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegExpandString.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegMultiString.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegMultiString.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegQWord.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegQWord.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Set-RegString.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Set-RegString.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Test-RegKey.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Test-RegKey.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/Test-RegValue.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSRemoteRegistry/Test-RegValue.ps1 -------------------------------------------------------------------------------- /PSRemoteRegistry/en-US/about_PSRemoteRegistry_Module.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_RemoteRegistry_Module 3 | 4 | SHORT DESCRIPTION 5 | Describes the RemoteRegistry module. 6 | 7 | LONG DESCRIPTION 8 | The RemoteRegistry module contains functions to create, modify, or delete registry subkeys and values on local or remote computers. 9 | The following functions are added to the current session when you import the module: 10 | 11 | Get-RegBinary 12 | ------------- 13 | Use Get-RegBinary to retrieve a binary data registry value (REG_BINARY) from local or remote computers. 14 | 15 | 16 | Get-RegDefault 17 | -------------- 18 | Use Get-RegDefault to retrieve registry default string (REG_SZ) value from local or remote computers. 19 | 20 | 21 | Get-RegDWord 22 | ------------ 23 | Use Get-RegDWord to retrieve a 32-bit binary number (REG_DWORD) registry value from local or remote computers. 24 | 25 | 26 | Get-RegExpandString 27 | ------------------- 28 | Use Get-RegExpandString to retrieve a null-terminated string that contains unexpanded references to environment variables (REG_EXPAND_SZ) from local or remote computers. 29 | 30 | 31 | Get-RegKey 32 | ---------- 33 | Use Get-RegKey to get registry keys on local or remote computers 34 | 35 | 36 | Get-RegMultipleString 37 | --------------------- 38 | Use Get-RegMultipleString to retrieve an array of null-terminated strings (REG_MULTI_SZ) from local or remote computers. 39 | 40 | 41 | Get-RegQWord 42 | ------------ 43 | Use Get-RegQWord to retrieve a 64-bit binary number registry value (REG_QWORD) from local or remote computers. 44 | 45 | 46 | Get-RegString 47 | ------------- 48 | Use Get-RegString to retrieve a registry string (REG_SZ) value from local or remote computers. 49 | 50 | 51 | Get-RegValue 52 | ------------ 53 | Use Set-RegDefault to set the default value (REG_SZ) of the registry key on local or remote computers. 54 | 55 | 56 | New-RegKey 57 | ---------- 58 | Use New-RegKey to create a new registry key on local or remote machines. 59 | 60 | 61 | Remove-RegKey 62 | ------------- 63 | Use Remove-RegKey to delete the specified registry key from local or remote computers. 64 | 65 | 66 | Remove-RegValue 67 | --------------- 68 | Use Set-RegString to delete the specified registry value from local or remote computers. 69 | 70 | 71 | Set-RegBinary 72 | ------------- 73 | Use Set-RegBinary to set or create a binary data registry value (REG_BINARY) from local or remote computers. 74 | 75 | 76 | Set-RegDefault 77 | -------------- 78 | Use Set-RegDefault to set the default value (REG_SZ) of the registry key on local or remote computers. 79 | 80 | 81 | Set-RegDWord 82 | ------------ 83 | Use Set-RegDWord to set or create a 32-bit binary number (REG_DWORD) on local or remote computers. 84 | 85 | 86 | Set-RegExpandString 87 | ------------------- 88 | Use Set-RegExpandString to set or create registry string (REG_EXPAND_SZ) value on local or remote computers. 89 | 90 | 91 | Set-RegMultipleString 92 | --------------------- 93 | Use Set-RegMultipleString to set or create an array of null-terminated strings (REG_MULTI_SZ) on local or remote computers. 94 | 95 | 96 | Set-RegQWord 97 | ------------ 98 | Use Set-RegQWord to set or create a 64-bit binary number (REG_QWORD) on local or remote computers. 99 | 100 | 101 | Set-RegString 102 | ------------- 103 | Use Set-RegString to set or create registry string (REG_SZ) value on local or remote computers. 104 | 105 | 106 | Test-RegKey 107 | ----------- 108 | Use Test-RegKey to determine if a registry key exists. 109 | 110 | 111 | Test-RegValue 112 | ------------- 113 | Use Test-RegValue to determine if the registry value exists. 114 | 115 | 116 | 117 | 118 | NOTE 119 | ---- 120 | 1. All the module functions that removes or sets regsitry values or keys (Set-Reg*,Remove-Reg*) are considered commands that modifies the system and the caller 121 | must confirm whether or not to make the change. To override these confirmations use -Confirm:$false or the -Force parameter. 122 | 123 | 2. Elavated PowerShell session is needed to load the module. If the PowerShell session is not elevated a warning message is logged to the console 124 | and you wont be able to use any of the module functions. 125 | 126 | 3. To view troubleshooting messages execute the functions with the Verbose parameter. 127 | 128 | Module Common Parameters 129 | ----------------- 130 | All functions support pinging target computers before to test if the machine is available before connecting to it. 131 | If the machine is not responding to the test a warning message is written to the console. 132 | 133 | 134 | 135 | 136 | SEE ALSO 137 | about_Modules 138 | Get-Module 139 | Import-Module 140 | Remove-Module 141 | 142 | "RegistryKey Class" (MSDN) 143 | http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.aspx -------------------------------------------------------------------------------- /PSSystemTools/Get-BootStatus.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-BootStatus.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-DisplaySetting.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-DisplaySetting.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-Font.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-Font.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-LogicalDiskInventory.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-LogicalDiskInventory.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-MultiTouchMaximum.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-MultiTouchMaximum.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-OSVersion.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-OSVersion.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-Processor.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-Processor.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-SystemFont.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-SystemFont.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-USB.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-USB.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Get-WindowsEdition.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Get-WindowsEdition.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Import-IniFile.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Import-IniFile.ps1 -------------------------------------------------------------------------------- /PSSystemTools/PSSystemTools.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/PSSystemTools.psd1 -------------------------------------------------------------------------------- /PSSystemTools/PSSystemTools.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/PSSystemTools.psm1 -------------------------------------------------------------------------------- /PSSystemTools/Test-32Bit.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Test-32Bit.ps1 -------------------------------------------------------------------------------- /PSSystemTools/Test-64Bit.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/Test-64Bit.ps1 -------------------------------------------------------------------------------- /PSSystemTools/en-us/about_PSSystemTools_Readme.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSSystemTools/en-us/about_PSSystemTools_Readme.help.txt -------------------------------------------------------------------------------- /PSSystemTools/en-us/about_System_Module.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_System_Module 3 | 4 | SHORT DESCRIPTION 5 | Describes the System module in the Windows 7 Resource Kit. 6 | 7 | LONG DESCRIPTION 8 | The System module contains functions that get information about the operating 9 | system on the local and remote computers. 10 | 11 | The System module adds the following functions to your session when you import 12 | the module. 13 | 14 | Get-BootStatus Gets information about how the system was started, e.g. Safe Mode 15 | Get-DisplaySetting Gets the width and height of the primary monitor. 16 | Get-LogicalDiskInventory Gets the logical disks on the local and remote computers. 17 | Get-MultiTouchMaximum Gets the number of fingers that can be used on a multitouch device. 18 | Get-OSVersion Gets the operating system Version of a local or remote computer. 19 | Get-Processor Gets processor information for local and remote computers. 20 | Get-WindowsEdition Gets the operating system edition. 21 | Test-32Bit Returns TRUE when the computer has a 32-bit processor architecture. 22 | Test-64Bit Returns TRUE when the computer has a 64-bit processor architecture. 23 | 24 | 25 | For information about these functions, use the Get-Help cmdlet. For example, 26 | to get detailed help for the Get-Feed function, type "get-help get-bootstatus -detailed." 27 | 28 | These functions are implemented in the module as scripts, but are available in the session 29 | as functions. 30 | 31 | 32 | SEE ALSO 33 | about_Modules 34 | Get-Module 35 | Import-Module 36 | Remove-Module -------------------------------------------------------------------------------- /PSUserTools/En-US/about_PSUserTools_Module.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_PSUserTools_Module 3 | 4 | SHORT DESCRIPTION 5 | Describes the PSUserTools module in the Windows 7 Resource Kit. 6 | 7 | LONG DESCRIPTION 8 | The PSUserTools module contains functions that manage and edit users and user 9 | groups on the computer. 10 | 11 | The PSUserTools module adds the following functions to your session when you import 12 | the module. 13 | 14 | 15 | Get-CurrentUser Gets information about the current user. 16 | Get-Everyone Gets information about all local accounts on the computer. 17 | Start-ProcessAsAdministrator Starts a process with Administrator permssions 18 | ("Run as administrator"). 19 | 20 | Test-IsAdministrator Returns TRUE when the current user is an administrator. 21 | 22 | For information about these functions, use the Get-Help cmdlet. For example, 23 | to get detailed help for the Get-Feed function, type "get-help get-everyone -detailed." 24 | 25 | These functions are implemented in the module as scripts, but are available in the session 26 | as functions. 27 | 28 | 29 | SEE ALSO 30 | about_Modules 31 | Get-Module 32 | Import-Module 33 | Remove-Module -------------------------------------------------------------------------------- /PSUserTools/En-US/about_PSUserTools_Readme.help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/En-US/about_PSUserTools_Readme.help.txt -------------------------------------------------------------------------------- /PSUserTools/Get-CurrentUser.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/Get-CurrentUser.ps1 -------------------------------------------------------------------------------- /PSUserTools/Get-Everyone.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/Get-Everyone.ps1 -------------------------------------------------------------------------------- /PSUserTools/PSUserTools.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/PSUserTools.psd1 -------------------------------------------------------------------------------- /PSUserTools/PSUserTools.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/PSUserTools.psm1 -------------------------------------------------------------------------------- /PSUserTools/Start-ProcessAsAdministrator.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/Start-ProcessAsAdministrator.ps1 -------------------------------------------------------------------------------- /PSUserTools/Test-IsAdministrator.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSUserTools/Test-IsAdministrator.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Add-WUOfflineSync.ps1: -------------------------------------------------------------------------------- 1 | Function Add-WUOfflineSync 2 | { 3 | <# 4 | .SYNOPSIS 5 | Register offline scaner service. 6 | 7 | .DESCRIPTION 8 | Use Add-WUOfflineSync to register Windows Update offline scan file. You may use old wsusscan.cab or wsusscn2.cab from Microsoft Baseline Security Analyzer (MSBA) or System Management Server Inventory Tool for Microsoft Updates (SMS ITMU). 9 | 10 | .PARAMETER Path 11 | Path to Windows Update offline scan file (wsusscan.cab or wsusscn2.cab). 12 | 13 | .PARAMETER Name 14 | Name under which it will be registered Windows Update offline service. Default name is 'Offline Sync Service'. 15 | 16 | .EXAMPLE 17 | Try register Offline Sync Service from file C:\wsusscan.cab at default name. 18 | 19 | PS C:\> Add-WUOfflineSync -Path C:\wsusscan.cab 20 | 21 | Confirm 22 | Are you sure you want to perform this action? 23 | Performing operation "Register Windows Update offline scan file: C:\wsusscan.cab" on Target "G1". 24 | [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y 25 | 26 | ServiceID IsManaged IsDefault Name 27 | --------- --------- --------- ---- 28 | a8f3b5e6-fb1f-4814-a047-2257d39c2460 False False Offline Sync Service 29 | 30 | .EXAMPLE 31 | Try register Offline Sync Service from file C:\wsusscn2.cab with own name. 32 | 33 | PS C:\> Add-WUOfflineSync -Path C:\wsusscn2.cab -Name 'Offline Sync Service2' 34 | 35 | Confirm 36 | Are you sure you want to perform this action? 37 | Performing operation "Register Windows Update offline scan file: C:\wsusscn2.cab" on Target "G1". 38 | [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y 39 | 40 | ServiceID IsManaged IsDefault Name 41 | --------- --------- --------- ---- 42 | 13df3d8f-78d7-4eb8-bb9c-2a101870d350 False False Offline Sync Service2 43 | 44 | .NOTES 45 | Author: Michal Gajda 46 | Blog : http://commandlinegeeks.com/ 47 | 48 | .LINK 49 | http://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc 50 | 51 | .LINK 52 | http://msdn.microsoft.com/en-us/library/aa387290(v=vs.85).aspx 53 | http://support.microsoft.com/kb/926464 54 | 55 | .LINK 56 | Get-WUServiceManager 57 | Remove-WUOfflineSync 58 | #> 59 | [OutputType('PSWindowsUpdate.WUServiceManager')] 60 | [CmdletBinding( 61 | SupportsShouldProcess=$True, 62 | ConfirmImpact="High" 63 | )] 64 | Param 65 | ( 66 | [parameter(Mandatory=$true)] 67 | [ValidateNotNullOrEmpty()] 68 | [String]$Path, 69 | [String]$Name 70 | ) 71 | 72 | Begin 73 | { 74 | $DefaultName = "Offline Sync Service" 75 | 76 | $User = [Security.Principal.WindowsIdentity]::GetCurrent() 77 | $Role = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 78 | 79 | if(!$Role) 80 | { 81 | Write-Warning "To perform some operations you must run an elevated Windows PowerShell console." 82 | } #End If !$Role 83 | } 84 | 85 | Process 86 | { 87 | If(-not (Test-Path $Path)) 88 | { 89 | Write-Warning "Windows Update offline scan file don't exist in this path: $Path" 90 | Return 91 | } #End If -not (Test-Path $Path) 92 | 93 | If($Name -eq $null) 94 | { 95 | $Name = $DefaultName 96 | } #End If $Name -eq $null 97 | 98 | $objServiceManager = New-Object -ComObject "Microsoft.Update.ServiceManager" 99 | Try 100 | { 101 | If ($pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Register Windows Update offline scan file: $Path")) 102 | { 103 | $objService = $objServiceManager.AddScanPackageService($Name,$Path,1) 104 | $objService.PSTypeNames.Clear() 105 | $objService.PSTypeNames.Add('PSWindowsUpdate.WUServiceManager') 106 | 107 | } #End If $pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Register Windows Update offline scan file: $Path" 108 | } #End Try 109 | Catch 110 | { 111 | If($_ -match "HRESULT: 0x80070005") 112 | { 113 | Write-Warning "Your security policy don't allow a non-administator identity to perform this task" 114 | } #End If $_ -match "HRESULT: 0x80070005" 115 | Else 116 | { 117 | Write-Error $_ 118 | } #End Else $_ -match "HRESULT: 0x80070005" 119 | 120 | Return 121 | } #End Catch 122 | 123 | Return $objService 124 | } #End Process 125 | 126 | End{} 127 | } #In The End :) 128 | -------------------------------------------------------------------------------- /PSWindowsUpdate/Add-WUServiceManager.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Add-WUServiceManager.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WUHistory.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Get-WUHistory.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WUInstall.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Get-WUInstall.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WUInstallerStatus.ps1: -------------------------------------------------------------------------------- 1 | Function Get-WUInstallerStatus 2 | { 3 | <# 4 | .SYNOPSIS 5 | Show Windows Update Installer status. 6 | 7 | .DESCRIPTION 8 | Use Get-WUInstallerStatus to show Windows Update Installer status. 9 | 10 | .PARAMETER Silent 11 | Get only status True/False without any more comments on screen. 12 | 13 | .EXAMPLE 14 | Check if Windows Update Installer is busy. 15 | 16 | PS C:\> Get-WUInstallerStatus 17 | Installer is ready. 18 | 19 | .EXAMPLE 20 | Check if Windows Update Installer is busy in silent mode. Return only True (isBusy) or False (isFree). 21 | 22 | PS C:\> Get-WUInstallerStatus -Silent 23 | False 24 | 25 | .NOTES 26 | Author: Michal Gajda 27 | Blog : http://commandlinegeeks.com/ 28 | 29 | .LINK 30 | http://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc 31 | 32 | .LINK 33 | Get-WURebootStatus 34 | #> 35 | 36 | [CmdletBinding( 37 | SupportsShouldProcess=$True, 38 | ConfirmImpact="Low" 39 | )] 40 | Param 41 | ( 42 | [Switch]$Silent 43 | ) 44 | 45 | Begin 46 | { 47 | $User = [Security.Principal.WindowsIdentity]::GetCurrent() 48 | $Role = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 49 | 50 | if(!$Role) 51 | { 52 | Write-Warning "To perform some operations you must run an elevated Windows PowerShell console." 53 | } #End If !$Role 54 | } 55 | 56 | Process 57 | { 58 | If ($pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Check that Windows Installer is ready to install next updates")) 59 | { 60 | $objInstaller=New-Object -ComObject "Microsoft.Update.Installer" 61 | 62 | Switch($objInstaller.IsBusy) 63 | { 64 | $true { If($Silent) {Return $true} Else {Write-Output "Installer is busy."}} 65 | $false { If($Silent) {Return $false} Else {Write-Output "Installer is ready."}} 66 | } #End Switch $objInstaller.IsBusy 67 | 68 | } #End If $pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Check that Windows Installer is ready to install next updates") 69 | } #End Process 70 | 71 | End{} 72 | } #In The End :) -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WUList.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Get-WUList.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WURebootStatus.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Get-WURebootStatus.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WUServiceManager.ps1: -------------------------------------------------------------------------------- 1 | Function Get-WUServiceManager 2 | { 3 | <# 4 | .SYNOPSIS 5 | Show Service Manager configuration. 6 | 7 | .DESCRIPTION 8 | Use Get-WUServiceManager to get available configuration of update services. 9 | 10 | .EXAMPLE 11 | Show currently available Windows Update Services on machine. 12 | 13 | PS C:\> Get-WUServiceManager 14 | 15 | ServiceID IsManaged IsDefault Name 16 | --------- --------- --------- ---- 17 | 9482f4b4-e343-43b6-b170-9a65bc822c77 False False Windows Update 18 | 7971f918-a847-4430-9279-4a52d1efe18d False False Microsoft Update 19 | 3da21691-e39d-4da6-8a4b-b43877bcb1b7 True True Windows Server Update Service 20 | 13df3d8f-78d7-4eb8-bb9c-2a101870d350 False False Offline Sync Service2 21 | a8f3b5e6-fb1f-4814-a047-2257d39c2460 False False Offline Sync Service 22 | 23 | .NOTES 24 | Author: Michal Gajda 25 | Blog : http://commandlinegeeks.com/ 26 | 27 | .LINK 28 | http://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc 29 | 30 | .LINK 31 | Add-WUOfflineSync 32 | Remove-WUOfflineSync 33 | #> 34 | [OutputType('PSWindowsUpdate.WUServiceManager')] 35 | [CmdletBinding( 36 | SupportsShouldProcess=$True, 37 | ConfirmImpact="Low" 38 | )] 39 | Param() 40 | 41 | Begin 42 | { 43 | $User = [Security.Principal.WindowsIdentity]::GetCurrent() 44 | $Role = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 45 | 46 | if(!$Role) 47 | { 48 | Write-Warning "To perform some operations you must run an elevated Windows PowerShell console." 49 | } #End If !$Role 50 | } 51 | 52 | Process 53 | { 54 | If ($pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Get Windows Update ServiceManager")) 55 | { 56 | $objServiceManager = New-Object -ComObject "Microsoft.Update.ServiceManager" 57 | 58 | $ServiceManagerCollection = @() 59 | Foreach ($objService in $objServiceManager.Services) 60 | { 61 | $objService.PSTypeNames.Clear() 62 | $objService.PSTypeNames.Add('PSWindowsUpdate.WUServiceManager') 63 | 64 | $ServiceManagerCollection += $objService 65 | } #End Foreach $objService in $objServiceManager.Services 66 | 67 | Return $ServiceManagerCollection 68 | } #End If $pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Get Windows Update ServiceManager") 69 | 70 | } #End Process 71 | 72 | End{} 73 | } #In The End :) -------------------------------------------------------------------------------- /PSWindowsUpdate/Get-WUUninstall.ps1: -------------------------------------------------------------------------------- 1 | Function Get-WUUninstall 2 | { 3 | <# 4 | .SYNOPSIS 5 | Uninstall update. 6 | 7 | .DESCRIPTION 8 | Use Get-WUUninstall to uninstall update. 9 | 10 | .PARAM KBArticleID 11 | Update ID that will be uninstalled. 12 | 13 | .EXAMPLE 14 | Try to uninstall update with specific KBArticleID = KB958830 15 | 16 | Get-WUUninstall -KBArticleID KB958830 17 | 18 | .NOTES 19 | Author: Michal Gajda 20 | Blog : http://commandlinegeeks.com/ 21 | 22 | .LINK 23 | http://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc 24 | 25 | .LINK 26 | Get-WUInstall 27 | Get-WUList 28 | #> 29 | 30 | [CmdletBinding( 31 | SupportsShouldProcess=$True, 32 | ConfirmImpact="High" 33 | )] 34 | Param 35 | ( 36 | [parameter(Mandatory=$true)] 37 | [Alias("HotFixID")] 38 | [String]$KBArticleID 39 | ) 40 | 41 | Begin 42 | { 43 | $User = [Security.Principal.WindowsIdentity]::GetCurrent() 44 | $Role = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 45 | 46 | if(!$Role) 47 | { 48 | Write-Warning "To perform some operations you must run an elevated Windows PowerShell console." 49 | } #End If !$Role 50 | } 51 | 52 | Process 53 | { 54 | If ($pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Uninstall update $KBArticleID")) 55 | { 56 | If($KBArticleID) 57 | { 58 | $KBArticleID = $KBArticleID -replace "KB", "" 59 | 60 | wusa /uninstall /kb:$KBArticleID 61 | } #End If $KBArticleID 62 | Else 63 | { 64 | wmic qfe list 65 | } #End Else $KBArticleID 66 | 67 | } #End If $pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Uninstall update $KBArticleID") 68 | } #End Process 69 | 70 | End{} 71 | } #In The End :) -------------------------------------------------------------------------------- /PSWindowsUpdate/Hide-WUUpdate.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Hide-WUUpdate.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Invoke-WUInstall.ps1: -------------------------------------------------------------------------------- 1 | Function Invoke-WUInstall 2 | { 3 | <# 4 | .SYNOPSIS 5 | Invoke Get-WUInstall remotely. 6 | 7 | .DESCRIPTION 8 | Use Invoke-WUInstall to invoke Windows Update install remotly. It Based on TaskScheduler because 9 | CreateUpdateDownloader() and CreateUpdateInstaller() methods can't be called from a remote computer - E_ACCESSDENIED. 10 | 11 | Note: 12 | Because we do not have the ability to interact, is recommended use -AcceptAll with WUInstall filters in script block. 13 | 14 | .PARAMETER ComputerName 15 | Specify computer name. 16 | 17 | .PARAMETER TaskName 18 | Specify task name. Default is PSWindowsUpdate. 19 | 20 | .PARAMETER Script 21 | Specify PowerShell script block that you what to run. Default is {ipmo PSWindowsUpdate; Get-WUInstall -AcceptAll | Out-File C:\PSWindowsUpdate.log} 22 | 23 | .EXAMPLE 24 | PS C:\> $Script = {ipmo PSWindowsUpdate; Get-WUInstall -AcceptAll -AutoReboot | Out-File C:\PSWindowsUpdate.log} 25 | PS C:\> Invoke-WUInstall -ComputerName pc1.contoso.com -Script $Script 26 | ... 27 | PS C:\> Get-Content \\pc1.contoso.com\c$\PSWindowsUpdate.log 28 | 29 | .NOTES 30 | Author: Michal Gajda 31 | Blog : http://commandlinegeeks.com/ 32 | 33 | .LINK 34 | Get-WUInstall 35 | #> 36 | [CmdletBinding( 37 | SupportsShouldProcess=$True, 38 | ConfirmImpact="High" 39 | )] 40 | param 41 | ( 42 | [Parameter(ValueFromPipeline=$True, 43 | ValueFromPipelineByPropertyName=$True)] 44 | [String[]]$ComputerName, 45 | [String]$TaskName = "PSWindowsUpdate", 46 | [ScriptBlock]$Script = {ipmo PSWindowsUpdate; Get-WUInstall -AcceptAll | Out-File C:\PSWindowsUpdate.log}, 47 | [Switch]$OnlineUpdate 48 | ) 49 | 50 | Begin 51 | { 52 | $User = [Security.Principal.WindowsIdentity]::GetCurrent() 53 | $Role = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 54 | 55 | if(!$Role) 56 | { 57 | Write-Warning "To perform some operations you must run an elevated Windows PowerShell console." 58 | } #End If !$Role 59 | 60 | $PSWUModule = Get-Module -Name PSWindowsUpdate -ListAvailable 61 | 62 | Write-Verbose "Create schedule service object" 63 | $Scheduler = New-Object -ComObject Schedule.Service 64 | 65 | $Task = $Scheduler.NewTask(0) 66 | 67 | $RegistrationInfo = $Task.RegistrationInfo 68 | $RegistrationInfo.Description = $TaskName 69 | $RegistrationInfo.Author = $User.Name 70 | 71 | $Settings = $Task.Settings 72 | $Settings.Enabled = $True 73 | $Settings.StartWhenAvailable = $True 74 | $Settings.Hidden = $False 75 | 76 | $Action = $Task.Actions.Create(0) 77 | $Action.Path = "powershell" 78 | $Action.Arguments = "-Command $Script" 79 | 80 | $Task.Principal.RunLevel = 1 81 | } 82 | 83 | Process 84 | { 85 | ForEach($Computer in $ComputerName) 86 | { 87 | If ($pscmdlet.ShouldProcess($Computer,"Invoke WUInstall")) 88 | { 89 | if(Test-Connection -ComputerName $Computer -Quiet) 90 | { 91 | Write-Verbose "Check PSWindowsUpdate module on $Computer" 92 | Try 93 | { 94 | $ModuleTest = Invoke-Command -ComputerName $Computer -ScriptBlock {Get-Module -ListAvailable -Name PSWindowsUpdate} -ErrorAction Stop 95 | } #End Try 96 | Catch 97 | { 98 | Write-Warning "Can't access to machine $Computer. Try use: winrm qc" 99 | Continue 100 | } #End Catch 101 | $ModulStatus = $false 102 | 103 | if($ModuleTest -eq $null -or $ModuleTest.Version -lt $PSWUModule.Version) 104 | { 105 | if($OnlineUpdate) 106 | { 107 | Update-WUModule -ComputerName $Computer 108 | } #End If $OnlineUpdate 109 | else 110 | { 111 | Update-WUModule -ComputerName $Computer -LocalPSWUSource (Get-Module -ListAvailable -Name PSWindowsUpdate).ModuleBase 112 | } #End Else $OnlineUpdate 113 | } #End If $ModuleTest -eq $null -or $ModuleTest.Version -lt $PSWUModule.Version 114 | 115 | #Sometimes can't connect at first time 116 | $Info = "Connect to scheduler and register task on $Computer" 117 | for ($i=1; $i -le 3; $i++) 118 | { 119 | $Info += "." 120 | Write-Verbose $Info 121 | Try 122 | { 123 | $Scheduler.Connect($Computer) 124 | Break 125 | } #End Try 126 | Catch 127 | { 128 | if($i -ge 3) 129 | { 130 | Write-Error "Can't connect to Schedule service on $Computer" -ErrorAction Stop 131 | } #End If $i -ge 3 132 | else 133 | { 134 | sleep -Seconds 1 135 | } #End Else $i -ge 3 136 | } #End Catch 137 | } #End For $i=1; $i -le 3; $i++ 138 | 139 | $RootFolder = $Scheduler.GetFolder("\") 140 | $SendFlag = 1 141 | if($Scheduler.GetRunningTasks(0) | Where-Object {$_.Name -eq $TaskName}) 142 | { 143 | $CurrentTask = $RootFolder.GetTask($TaskName) 144 | $Title = "Task $TaskName is curretly running: $($CurrentTask.Definition.Actions | Select-Object -exp Path) $($CurrentTask.Definition.Actions | Select-Object -exp Arguments)" 145 | $Message = "What do you want to do?" 146 | 147 | $ChoiceContiniue = New-Object System.Management.Automation.Host.ChoiceDescription "&Continue Current Task" 148 | $ChoiceStart = New-Object System.Management.Automation.Host.ChoiceDescription "Stop and Start &New Task" 149 | $ChoiceStop = New-Object System.Management.Automation.Host.ChoiceDescription "&Stop Task" 150 | $Options = [System.Management.Automation.Host.ChoiceDescription[]]($ChoiceContiniue, $ChoiceStart, $ChoiceStop) 151 | $SendFlag = $host.ui.PromptForChoice($Title, $Message, $Options, 0) 152 | 153 | if($SendFlag -ge 1) 154 | { 155 | ($RootFolder.GetTask($TaskName)).Stop(0) 156 | } #End If $SendFlag -eq 1 157 | 158 | } #End If !($Scheduler.GetRunningTasks(0) | Where-Object {$_.Name -eq $TaskName}) 159 | 160 | if($SendFlag -eq 1) 161 | { 162 | $RootFolder.RegisterTaskDefinition($TaskName, $Task, 6, "SYSTEM", $Null, 1) | Out-Null 163 | $RootFolder.GetTask($TaskName).Run(0) | Out-Null 164 | } #End If $SendFlag -eq 1 165 | 166 | #$RootFolder.DeleteTask($TaskName,0) 167 | } #End If Test-Connection -ComputerName $Computer -Quiet 168 | else 169 | { 170 | Write-Warning "Machine $Computer is not responding." 171 | } #End Else Test-Connection -ComputerName $Computer -Quiet 172 | } #End If $pscmdlet.ShouldProcess($Computer,"Invoke WUInstall") 173 | } #End ForEach $Computer in $ComputerName 174 | Write-Verbose "Invoke-WUInstall complete." 175 | } 176 | 177 | End {} 178 | 179 | } -------------------------------------------------------------------------------- /PSWindowsUpdate/PSWindowsUpdate.Format.ps1xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PSWindowsUpdate 6 | 7 | PSWindowsUpdate.WUInstall 8 | 9 | 10 | 11 | 12 | 1 13 | 14 | 15 | 10 16 | 17 | 18 | 9 19 | 20 | 21 | Right 22 | 6 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | X 31 | 32 | 33 | Status 34 | 35 | 36 | KB 37 | 38 | 39 | Size 40 | 41 | 42 | Title 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | PSWindowsUpdate 51 | 52 | PSWindowsUpdate.WUList 53 | System.__ComObject#{c1c2f21a-d2f4-4902-b5c6-8a081c19a890} 54 | System.__ComObject#{70cf5c82-8642-42bb-9dbc-0cfd263c6c4f} 55 | 56 | 57 | 58 | 59 | 12 60 | 61 | 62 | 6 63 | 64 | 65 | 9 66 | 67 | 68 | Right 69 | 6 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | ComputerName 78 | 79 | 80 | Status 81 | 82 | 83 | KB 84 | 85 | 86 | Size 87 | 88 | 89 | Title 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | PSWindowsUpdate 98 | 99 | PSWindowsUpdate.WUHistory 100 | System.__ComObject#{c2bfb780-4539-4132-ab8c-0a8772013ab6} 101 | 102 | 103 | 104 | 105 | 12 106 | 107 | 108 | 19 109 | 110 | 111 | 9 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | ComputerName 120 | 121 | 122 | Date 123 | 124 | 125 | KB 126 | 127 | 128 | Title 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | PSWindowsUpdate 137 | 138 | PSWindowsUpdate.WUServiceManager 139 | System.__ComObject#{1518b460-6518-4172-940f-c75883b24ceb} 140 | 141 | 142 | 143 | 144 | 36 145 | 146 | 147 | 9 148 | 149 | 150 | 151 | 9 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | ServiceID 160 | 161 | 162 | IsManaged 163 | 164 | 165 | IsDefaultAUService 166 | 167 | 168 | Name 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /PSWindowsUpdate/PSWindowsUpdate.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/PSWindowsUpdate.psd1 -------------------------------------------------------------------------------- /PSWindowsUpdate/PSWindowsUpdate.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/PSWindowsUpdate.psm1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Remove-WUOfflineSync.ps1: -------------------------------------------------------------------------------- 1 | Function Remove-WUOfflineSync 2 | { 3 | <# 4 | .SYNOPSIS 5 | Unregister offline scaner service. 6 | 7 | .DESCRIPTION 8 | Use Remove-WUOfflineSync to unregister Windows Update offline scan file (wsusscan.cab or wsusscn2.cab) from current machine. 9 | 10 | .EXAMPLE 11 | Check if Offline Sync Service is registered and try unregister it. 12 | 13 | PS C:\> Remove-WUOfflineSync 14 | 15 | Confirm 16 | Are you sure you want to perform this action? 17 | Performing operation "Unregister Windows Update offline scan file" on Target "G1". 18 | [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y 19 | 20 | ServiceID IsManaged IsDefault Name 21 | --------- --------- --------- ---- 22 | 9482f4b4-e343-43b6-b170-9a65bc822c77 False False Windows Update 23 | 7971f918-a847-4430-9279-4a52d1efe18d False False Microsoft Update 24 | 3da21691-e39d-4da6-8a4b-b43877bcb1b7 True True Windows Server Update Service 25 | 26 | .NOTES 27 | Author: Michal Gajda 28 | Blog : http://commandlinegeeks.com/ 29 | 30 | .LINK 31 | http://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc 32 | 33 | .LINK 34 | Get-WUServiceManager 35 | Add-WUOfflineSync 36 | #> 37 | 38 | [CmdletBinding( 39 | SupportsShouldProcess=$True, 40 | ConfirmImpact="High" 41 | )] 42 | Param() 43 | 44 | Begin 45 | { 46 | $User = [Security.Principal.WindowsIdentity]::GetCurrent() 47 | $Role = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 48 | 49 | if(!$Role) 50 | { 51 | Write-Warning "To perform some operations you must run an elevated Windows PowerShell console." 52 | } #End If !$Role 53 | } 54 | 55 | Process 56 | { 57 | $objServiceManager = New-Object -ComObject "Microsoft.Update.ServiceManager" 58 | 59 | $State = 1 60 | Foreach ($objService in $objServiceManager.Services) 61 | { 62 | If($objService.Name -eq "Offline Sync Service") 63 | { 64 | If ($pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Unregister Windows Update offline scan file")) 65 | { 66 | Try 67 | { 68 | $objServiceManager.RemoveService($objService.ServiceID) 69 | } #End Try 70 | Catch 71 | { 72 | If($_ -match "HRESULT: 0x80070005") 73 | { 74 | Write-Warning "Your security policy don't allow a non-administator identity to perform this task" 75 | } #End If $_ -match "HRESULT: 0x80070005" 76 | Else 77 | { 78 | Write-Error $_ 79 | } #End Else $_ -match "HRESULT: 0x80070005" 80 | 81 | Return 82 | } #End Catch 83 | } #End If $pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Unregister Windows Update offline scan file") 84 | 85 | Get-WUServiceManager 86 | $State = 0; 87 | 88 | } #End If $objService.Name -eq "Offline Sync Service" 89 | } #End Foreach $objService in $objServiceManager.Services 90 | 91 | If($State) 92 | { 93 | Write-Warning "Offline Sync Service don't exist on current machine." 94 | } #End If $State 95 | } #End Process 96 | 97 | End{} 98 | } #In The End :) -------------------------------------------------------------------------------- /PSWindowsUpdate/Remove-WUServiceManager.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Remove-WUServiceManager.ps1 -------------------------------------------------------------------------------- /PSWindowsUpdate/Update-WUModule.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/PSWindowsUpdate/Update-WUModule.ps1 -------------------------------------------------------------------------------- /PTSManageISE/Get-ISEMRUList.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | dumps the current path names in the ISE MRU list 4 | .EXAMPLE 5 | Get-ISEMRUList 6 | dumps the paths to all recently used files in the ISE editor 7 | #> 8 | Function Get-ISEMRUList 9 | { 10 | $newfile = 'c:\somescript.ps1' 11 | 12 | $folder = (Resolve-Path -Path $env:localappdata\microsoft_corporation\powershell_ise*\3.0.0.0).Path 13 | $filename = 'user.config' 14 | $path = Join-Path -Path $folder -ChildPath $filename 15 | 16 | [xml]$xml = Get-Content -Path $path -Raw 17 | $xml.SelectNodes('//setting[@name="MRU"]').Value.ArrayOfString.string 18 | } 19 | -------------------------------------------------------------------------------- /PTSManageISE/Get-ISESetting.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | reads one or more settings for the ISE editor 4 | .PARAMETER Name 5 | Name of setting to read. You can use wildcards. 6 | If you do not supply a name, all settings are retrieved. 7 | If you do not use wildcards, only the value will be returned. 8 | If you do use wildcards, the setting name will also be returned. 9 | .EXAMPLE 10 | Get-ISESetting MRUCount 11 | Reads the maximum number of files in your MRU list 12 | .EXAMPLE 13 | Get-ISESetting 14 | returns all settings 15 | .EXAMPLE 16 | Get-ISESetting *wind* 17 | returns all settings with "wind" in their name 18 | #> 19 | Function Get-ISESetting 20 | { 21 | param 22 | ( 23 | $Name = '*' 24 | ) 25 | 26 | $folder = (Resolve-Path -Path $env:localappdata\microsoft_corporation\powershell_ise*\3.0.0.0).Path 27 | $filename = 'user.config' 28 | $path = Join-Path -Path $folder -ChildPath $filename 29 | 30 | [xml]$xml = Get-Content -Path $path -Raw 31 | 32 | # wildcards used? 33 | $wildCard = $Name -match '\*' 34 | 35 | # find all settings available with their correct casing: 36 | $settings = $xml.SelectNodes('//setting') | Where-Object serializeAs -EQ String | Select-Object -ExpandProperty Name 37 | # translate the user-submitted setting into the correct casing: 38 | $CorrectSettingName = @($settings -like $Name) 39 | 40 | # if no setting is found, try with wildcards 41 | if ($CorrectSettingName.Count -eq 0) 42 | { 43 | $CorrectSettingName = @($settings -like "*$Name*") 44 | $wildCard = $true 45 | } 46 | 47 | if ($CorrectSettingName.Count -gt 1 -or $wildCard) 48 | { 49 | $CorrectSettingName | 50 | ForEach-Object { 51 | $xml.SelectNodes(('//setting[@name="{0}"]' -f $_)) | 52 | Select-Object -Property Name, Value 53 | } 54 | } 55 | elseif ($CorrectSettingName.Count -eq 1) 56 | { 57 | $xml.SelectNodes(('//setting[@name="{0}"]' -f $CorrectSettingname[0])) | 58 | Select-Object -ExpandProperty Value 59 | } 60 | else 61 | { 62 | Write-Warning "The setting '$SettingName' does not exist. Try one of these valid settings:" 63 | Write-Warning ($settings -join ', ') 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /PTSManageISE/PTSManageISE.psd1: -------------------------------------------------------------------------------- 1 | # 2 | # Module manifest for module 'PTSManageISE' 3 | # 4 | # Generated by: Tobias 5 | # 6 | # Generated on: 21.09.2012 7 | # 8 | 9 | @{ 10 | 11 | # Script module or binary module file associated with this manifest. 12 | ModuleToProcess = 'PTSManageISE.psm1' 13 | 14 | # Version number of this module. 15 | ModuleVersion = '1.0' 16 | 17 | # ID used to uniquely identify this module 18 | GUID = 'b93e2683-5828-4b77-bec9-00cd08ab144d' 19 | 20 | # Author of this module 21 | Author = 'Tobias' 22 | 23 | # Company or vendor of this module 24 | CompanyName = 'Unknown' 25 | 26 | # Copyright statement for this module 27 | Copyright = '(C) 2012 Tobias' 28 | 29 | # Description of the functionality provided by this module 30 | # Description = '' 31 | 32 | # Minimum version of the Windows PowerShell engine required by this module 33 | # PowerShellVersion = '' 34 | 35 | # Name of the Windows PowerShell host required by this module 36 | # PowerShellHostName = '' 37 | 38 | # Minimum version of the Windows PowerShell host required by this module 39 | # PowerShellHostVersion = '' 40 | 41 | # Minimum version of the .NET Framework required by this module 42 | # DotNetFrameworkVersion = '' 43 | 44 | # Minimum version of the common language runtime (CLR) required by this module 45 | # CLRVersion = '' 46 | 47 | # Processor architecture (None, X86, Amd64) required by this module 48 | # ProcessorArchitecture = '' 49 | 50 | # Modules that must be imported into the global environment prior to importing this module 51 | # RequiredModules = @() 52 | 53 | # Assemblies that must be loaded prior to importing this module 54 | RequiredAssemblies = @() 55 | 56 | # Script files (.ps1) that are run in the caller's environment prior to importing this module. 57 | # ScriptsToProcess = @() 58 | 59 | # Type files (.ps1xml) to be loaded when importing this module 60 | TypesToProcess = @() 61 | 62 | # Format files (.ps1xml) to be loaded when importing this module 63 | FormatsToProcess = @() 64 | 65 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess 66 | NestedModules = @() 67 | 68 | # Functions to export from this module 69 | FunctionsToExport = '*' 70 | 71 | # Cmdlets to export from this module 72 | CmdletsToExport = '*' 73 | 74 | # Variables to export from this module 75 | VariablesToExport = '*' 76 | 77 | # Aliases to export from this module 78 | AliasesToExport = '*' 79 | 80 | # List of all modules packaged with this module. 81 | # ModuleList = @() 82 | 83 | # List of all files packaged with this module 84 | FileList = @() 85 | 86 | # Private data to pass to the module specified in RootModule/ModuleToProcess 87 | # PrivateData = '' 88 | 89 | # HelpInfo URI of this module 90 | # HelpInfoURI = '' 91 | 92 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. 93 | # DefaultCommandPrefix = '' 94 | 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /PTSManageISE/PTSManageISE.psm1: -------------------------------------------------------------------------------- 1 | Get-ChildItem $psscriptroot\*.ps1 | Foreach-Object { . $_.FullName } -------------------------------------------------------------------------------- /PTSManageISE/Set-ISEMRUList.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | adds a new file path to the MRU list or replaces the list with new files 4 | .PARAMETER Path 5 | Path to add to the list. Can be an array, can be received from the pipeline. 6 | .PARAMETER Append 7 | Adds the path(s) to the existing list 8 | .EXAMPLE 9 | Set-ISEMRUList -Path c:\dummy -Append 10 | Adds a new path to the MRU list, keeping the old paths. 11 | .EXAMPLE 12 | dir $home *.ps1 -recurse -ea 0 | Select-Object -ExpandProperty Fullname | Set-ISEMRUList 13 | replaces existing MRU list with the paths to all powershell script files in your profile 14 | If the list exceeds the number of entries defined in the ISE setting MruCount, the remainder is truncated. 15 | #> 16 | Function Set-ISEMRUList 17 | { 18 | param 19 | ( 20 | [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] 21 | [String[]] 22 | $Path, 23 | 24 | [Switch] 25 | $Append 26 | ) 27 | 28 | Begin 29 | { 30 | $folder = (Resolve-Path -Path $env:localappdata\microsoft_corporation\powershell_ise*\3.0.0.0).Path 31 | $filename = 'user.config' 32 | $configpath = Join-Path -Path $folder -ChildPath $filename 33 | 34 | [xml]$xml = Get-Content -Path $configpath -Raw 35 | 36 | $PathList = @() 37 | } 38 | 39 | Process 40 | { 41 | $Path | ForEach-Object { $PathList += $_ } 42 | } 43 | 44 | End 45 | { 46 | if ($Append) 47 | { 48 | $PathList += @($xml.SelectNodes('//setting[@name="MRU"]').Value.ArrayOfString.string) 49 | } 50 | 51 | # is list too long? 52 | $max = Get-ISESetting -Name MRUCount 53 | $current = $PathList.Count 54 | 55 | if ($current -gt $max) 56 | { 57 | if (!$Append) 58 | { 59 | Write-Warning "Your MRU list is too long. It has $current elements but MRUCount is limited to $max elements." 60 | Write-Warning "Truncating the last $($current - $max) elements." 61 | Write-Warning 'You can increase the size of your MRU list like this:' 62 | Write-Warning "Set-ISESetting -Name MRUCount -Value $current" 63 | } 64 | 65 | $PathList = $PathList[0..$($max-1)] 66 | } 67 | 68 | $xml.SelectNodes('//setting[@name="MRU"]').Value.ArrayOfString.InnerXML = $PathList | 69 | ForEach-Object { "$_" } | 70 | Out-String 71 | $xml.Save($configpath) 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /PTSManageISE/Set-ISESetting.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | sets a settings for the ISE editor 4 | .PARAMETER Name 5 | Name of setting to change. 6 | .PARAMETER Value 7 | New value for setting. There is no validation. You are responsible for submitting valid values. 8 | .EXAMPLE 9 | Set-ISESetting MRUCount 12 10 | Sets the maximum number of files in your MRU list to 12 11 | #> 12 | Function Set-ISESetting 13 | { 14 | param 15 | ( 16 | [Parameter(Mandatory,ValueFromPipelineByPropertyName)] 17 | $Name, 18 | 19 | [Parameter(Mandatory,ValueFromPipelineByPropertyName)] 20 | $Value 21 | ) 22 | 23 | Begin 24 | { 25 | $folder = (Resolve-Path -Path $env:localappdata\microsoft_corporation\powershell_ise*\3.0.0.0).Path 26 | $filename = 'user.config' 27 | $path = Join-Path -Path $folder -ChildPath $filename 28 | 29 | [xml]$xml = Get-Content -Path $path -Raw 30 | 31 | # find all settings available with their correct casing: 32 | $settings = $xml.SelectNodes('//setting') | Where-Object serializeAs -EQ String | Select-Object -ExpandProperty Name 33 | } 34 | 35 | Process 36 | { 37 | # translate the user-submitted setting into the correct casing: 38 | $CorrectSettingName = $settings -like $Name 39 | 40 | if ($CorrectSettingName) 41 | { 42 | $xml.SelectNodes(('//setting[@name="{0}"]' -f $CorrectSettingName))[0].Value = [String]$Value 43 | } 44 | else 45 | { 46 | Write-Warning "The setting '$SettingName' does not exist. Try one of these valid settings:" 47 | Write-Warning ($settings -join ', ') 48 | } 49 | } 50 | 51 | End 52 | { 53 | $xml.Save($Path) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Pipeworks/Add-AzureLocalResource.ps1: -------------------------------------------------------------------------------- 1 | function Add-AzureLocalResource 2 | { 3 | <# 4 | .Synopsis 5 | Adds an Azure local storage resource to a service definition 6 | .Description 7 | Adds an Azure local storage resource to a service definition. 8 | 9 | Azure local storage can create well-known directories on the host machine 10 | .Example 11 | New-AzureServiceDefinition -ServiceName "foo" | 12 | Add-AzureLocalResource -ServiceDefinition 13 | .Link 14 | New-AzureServiceDefinition 15 | #> 16 | [OutputType([xml],[string])] 17 | param( 18 | # The ServiceDefinition XML. This should be created with New-AzureServiceDefinition or retreived with Import-AzureServiceDefinition 19 | [Parameter(Mandatory=$true, 20 | ValueFromPipeline=$true, 21 | ValueFromPipelineByPropertyName=$true)] 22 | [ValidateScript({ 23 | $isServiceDefinition = $_.NameTable.Get("http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition") 24 | if (-not $IsServiceDefinition) { 25 | throw "Input must be a ServiceDefinition XML" 26 | } 27 | return $true 28 | })] 29 | [Xml] 30 | $ServiceDefinition, 31 | 32 | # If set, the local resource will only apply to the role named ToRole. If ToRole is not found, or doesn't 33 | # exist, the last role will be used. 34 | [string] 35 | $ToRole, 36 | 37 | # The name of the local storage. This will be the path of the name storage element, relative to the root drive. 38 | [Parameter(Mandatory=$true)] 39 | [string] 40 | $Name, 41 | 42 | # The size of the storage. Sizes will be rounded up to the nearest megabyte. 43 | [Long] 44 | $Size = 1mb, 45 | 46 | # If set, a role will not be cleaned on recycle 47 | [switch] 48 | $DoNotcleanOnRoleRecycle, 49 | 50 | # If set, will output results as string rather than XML 51 | [switch] 52 | $AsString 53 | ) 54 | 55 | process { 56 | 57 | #region Resolve the role if it set, create the role if it doesn't exist, and track it if they assume the last item. 58 | $roles = @($ServiceDefinition.ServiceDefinition.WebRole), @($ServiceDefinition.ServiceDefinition.WorkerRole) + @($ServiceDefinition.ServiceDefinition.VirtualMachineRole) 59 | $xmlNamespace = @{'ServiceDefinition'='http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition'} 60 | $selectXmlParams = @{ 61 | XPath = '//ServiceDefinition:WebRole|//ServiceDefinition:WorkerRole|//ServiceDefinition:VirtualMachineRole' 62 | Namespace = $xmlNamespace 63 | } 64 | $roles = @(Select-Xml -Xml $ServiceDefinition @selectXmlParams | 65 | Select-Object -ExpandProperty Node) 66 | if (-not $roles) { 67 | $ServiceDefinition = $ServiceDefinition | 68 | Add-AzureRole -RoleName "WebRole1" 69 | 70 | $roles = @(Select-Xml -Xml $ServiceDefinition @selectXmlParams | 71 | Select-Object -ExpandProperty Node) 72 | } 73 | #endregion Resolve the role if it set, create the role if it doesn't exist, and track it if they assume the last item. 74 | 75 | if ($roles.Count -gt 1) { 76 | if ($ToRole) { 77 | } else { 78 | $role = $roles[-1] 79 | } 80 | } else { 81 | if ($ToRole) { 82 | if ($roles[0].Name -eq $ToRole) { 83 | $role = $roles[0] 84 | } else { 85 | $role = $null 86 | } 87 | } else { 88 | $role = $roles[0] 89 | } 90 | } 91 | 92 | if (-not $role) { return } 93 | 94 | $realSize = [Math]::Ceiling($size / 1mb) 95 | 96 | if (-not $role.LocalResources) { 97 | $role.InnerXml += "" 98 | } 99 | 100 | $localResourcesNode = Select-Xml -Xml $role -Namespace $xmlNamespace -XPath '//ServiceDefinition:LocalResources' | 101 | Select-Object -ExpandProperty Node 102 | 103 | $localResourcesNode.InnerXml += "" 104 | 105 | } 106 | 107 | end { 108 | if ($AsString) { 109 | $strWrite = New-Object IO.StringWriter 110 | $serviceDefinition.Save($strWrite) 111 | return "$strWrite" 112 | } else { 113 | $serviceDefinition 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /Pipeworks/Add-AzureRole.ps1: -------------------------------------------------------------------------------- 1 | function Add-AzureRole 2 | { 3 | <# 4 | .Synopsis 5 | Adds and azure role to a service definition 6 | .Description 7 | Adds an azure role to a service definition 8 | .Example 9 | New-AzureServiceDefinition -ServiceName AService | 10 | Add-AzureRole -RoleName MyWebRole -VMSize Large -RoleType Web -AsString 11 | .Link 12 | New-AzureServiceDefinition 13 | #> 14 | [OutputType([xml],[string])] 15 | param( 16 | # The Service Definition 17 | [Parameter(Mandatory=$true, 18 | ValueFromPipeline=$true, 19 | ValueFromPipelineByPropertyName=$true)] 20 | [ValidateScript({ 21 | $isServiceDefinition = $_.NameTable.Get("http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition") 22 | if (-not $IsServiceDefinition) { 23 | throw "Input must be a ServiceDefinition XML" 24 | } 25 | return $true 26 | })] 27 | [Xml] 28 | $ServiceDefinition, 29 | 30 | # The name of the role 31 | [Parameter(Mandatory=$true, 32 | ValueFromPipelineByPropertyName=$true)] 33 | [string] 34 | $RoleName, 35 | 36 | # The VMSize 37 | [ValidateSet('ExtraSmall','Small','Medium', 'Large', 'Extra-Large', 'XS', 'XL', 'S', 'M', 'L')] 38 | [string] 39 | $VMSize, 40 | 41 | # If set, will disable native code execution on the role. This will prevent PHP or other CGI from working 42 | [Switch] 43 | $DisableNativeCodeExecution, 44 | 45 | # If set, will output as a string 46 | [switch] 47 | $AsString, 48 | 49 | # The type of the role. 50 | [ValidateSet('Web','Worker','VirtualMachine', 'VM')] 51 | [string] 52 | $RoleType = 'Web' 53 | ) 54 | 55 | process { 56 | #region Correct Parameters 57 | $enableNativeCodeExecution = (-not $DisableNativeCodeExecution).ToString().ToLower() 58 | $vmSize = if ('XS' -eq $VmSize) { 59 | "ExtraSmall" 60 | } elseif ('XL' -eq $VmSize) { 61 | "ExtraLarge" 62 | } elseif ('M' -eq $VmSize) { 63 | "Medium" 64 | } elseif ('S' -eq $VmSize) { 65 | "Small" 66 | } elseif ('L' -eq $VmSize) { 67 | "Large" 68 | } elseif ($vmSize) { 69 | $vmSize 70 | } else { 71 | $null 72 | } 73 | 74 | if ($vmSize) { 75 | # Force every instance of a subword into camel case 76 | foreach ($subWord in 'Extra','Small', 'Medium', 'Large') { 77 | $vmSize= $vmSize -ireplace $subWord, $subWord 78 | } 79 | } 80 | #endregion Correct Parameters 81 | 82 | $roleElement = if ($roleType -eq 'Web') { 83 | "WebRole" 84 | } elseif ($roleType -eq 'Worker') { 85 | "WorkerRole" 86 | } elseif ('VirtualMachine', 'VM' -contains $roleType) { 87 | "VirtualMachineRole" 88 | } 89 | 90 | if ($vmSize) { 91 | @($serviceDefinition.ChildNodes)[-1].InnerXml += "<$roleElement name='$RoleName' vmsize='$VMSize' enableNativeCodeExecution='$enableNativeCodeExecution' />" 92 | } else { 93 | @($serviceDefinition.ChildNodes)[-1].InnerXml += "<$roleElement name='$RoleName' enableNativeCodeExecution='$enableNativeCodeExecution' />" 94 | } 95 | 96 | 97 | } 98 | 99 | end { 100 | if ($AsString) { 101 | $strWrite = New-Object IO.StringWriter 102 | $serviceDefinition.Save($strWrite) 103 | return "$strWrite" 104 | } else { 105 | $serviceDefinition 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Pipeworks/Add-AzureSetting.ps1: -------------------------------------------------------------------------------- 1 | function Add-AzureSetting 2 | { 3 | <# 4 | .Synopsis 5 | Adds an Azure local storage resource to a service definition 6 | .Description 7 | Adds an Azure local storage resource to a service definition. 8 | 9 | Azure local storage can create well-known directories on the host machine 10 | .Link 11 | New-AzureServiceDefinition 12 | .Example 13 | New-AzureServiceDefinition -ServiceName MyService | 14 | Add-AzureSetting -Name MySetting -Value MyValue -AsString 15 | #> 16 | [CmdletBinding(DefaultParameterSetName='NameAndValue')] 17 | [OutputType([xml],[string])] 18 | param( 19 | # The ServiceDefinition XML. This should be created with New-AzureServiceDefinition or retreived with Import-AzureServiceDefinition 20 | [Parameter(Mandatory=$true, 21 | ValueFromPipeline=$true, 22 | ValueFromPipelineByPropertyName=$true)] 23 | [ValidateScript({ 24 | $isServiceDefinition = $_.NameTable.Get("http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition") 25 | if (-not $IsServiceDefinition) { 26 | throw "Input must be a ServiceDefinition XML" 27 | } 28 | return $true 29 | })] 30 | [Xml] 31 | $ServiceDefinition, 32 | 33 | # The name of the setting to configure 34 | [Parameter(Mandatory=$true, ParameterSetName='NameAndValue')] 35 | [string] 36 | $Name, 37 | 38 | # The value to us for the setting 39 | [Parameter(Mandatory=$true, ParameterSetName='NameAndValue')] 40 | [string] 41 | $Value, 42 | 43 | # A table of names and values for Azure settings 44 | [Parameter(Mandatory=$true, ParameterSetName='SettingTable')] 45 | [Hashtable] 46 | $Setting, 47 | 48 | # If set, will output results as string rather than XML 49 | [switch] 50 | $AsString 51 | ) 52 | 53 | process { 54 | if ($psCmdlet.ParameterSetName -eq 'NameAndValue') { 55 | # Resolve the role if it set, create the role if it doesn't exist, and track it if they assume the last item. 56 | $roles = @($ServiceDefinition.ServiceDefinition.WebRole), 57 | @($ServiceDefinition.ServiceDefinition.WorkerRole) + 58 | @($ServiceDefinition.ServiceDefinition.VirtualMachineRole) 59 | $xmlNamespace = @{'ServiceDefinition'='http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition'} 60 | $selectXmlParams = @{ 61 | XPath = '//ServiceDefinition:WebRole|//ServiceDefinition:WorkerRole|//ServiceDefinition:VirtualMachineRole' 62 | Namespace = $xmlNamespace 63 | } 64 | $roles = @(Select-Xml -Xml $ServiceDefinition @selectXmlParams | 65 | Select-Object -ExpandProperty Node) 66 | if (-not $roles) { 67 | $ServiceDefinition = $ServiceDefinition | 68 | Add-AzureRole -RoleName "WebRole1" 69 | 70 | $roles = @(Select-Xml -Xml $ServiceDefinition @selectXmlParams | 71 | Select-Object -ExpandProperty Node) 72 | } 73 | 74 | if ($roles.Count -gt 1) { 75 | if ($ToRole) { 76 | } else { 77 | $role = $roles[-1] 78 | } 79 | } else { 80 | if ($ToRole) { 81 | if ($roles[0].Name -eq $ToRole) { 82 | $role = $roles[0] 83 | } else { 84 | $role = $null 85 | } 86 | } else { 87 | $role = $roles[0] 88 | } 89 | } 90 | 91 | if (-not $role) { return } 92 | 93 | if (-not $role.ConfigurationSettings) { 94 | $role.InnerXml += "" 95 | } 96 | $ConfigurationSettingsNode = 97 | $(Select-Xml -Xml $role -Namespace $xmlNamespace -XPath '//ServiceDefinition:ConfigurationSettings' | 98 | Select-Object -ExpandProperty Node -First 1) 99 | 100 | $ConfigurationSettingsNode.InnerXml += "" 101 | } elseif ($psCmdlet.ParameterSetName -eq 'SettingTable') { 102 | $null = $psboundParameters.Remove('asString') 103 | $null = $psboundParameters.Remove('setting') 104 | foreach ($kv in $setting.GetEnumerator()) { 105 | $psboundParameters.Name = $kv.Key 106 | $psboundParameters.Value = $kv.Value 107 | $psboundParameters.ServiceDefinition = $ServiceDefinition 108 | $ServiceDefinition = & $myInvocation.MyCommand @psBoundParameters 109 | } 110 | } 111 | } 112 | 113 | end { 114 | if ($AsString) { 115 | $strWrite = New-Object IO.StringWriter 116 | $serviceDefinition.Save($strWrite) 117 | return "$strWrite" 118 | } else { 119 | $serviceDefinition 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Pipeworks/Add-AzureStartupTask.ps1: -------------------------------------------------------------------------------- 1 | function Add-AzureStartupTask 2 | { 3 | <# 4 | .Synopsis 5 | Adds a startup task to Azure 6 | .Description 7 | Adds a startup task to an azure service configuration, and packs some extra information into the XML to allow 8 | using ScriptBlock as startup tasks 9 | .Example 10 | New-AzureServiceDefinition -ServiceName "MyService" | 11 | Add-AzureStartupTask -ScriptBlock { "Hello World" } -Elevated -asString 12 | 13 | .Link 14 | Out-AzureService 15 | #> 16 | [OutputType([xml],[string])] 17 | [CmdletBinding(DefaultParameterSetName='CommandLine')] 18 | param( 19 | # The Service Definition XML 20 | [Parameter(Mandatory=$true, 21 | ValueFromPipeline=$true, 22 | ValueFromPipelineByPropertyName=$true)] 23 | [ValidateScript({ 24 | $isServiceDefinition = $_.NameTable.Get("http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition") 25 | if (-not $IsServiceDefinition) { 26 | throw "Input must be a ServiceDefinition XML" 27 | } 28 | return $true 29 | })] 30 | [Xml] 31 | $ServiceDefinition, 32 | 33 | # The role 34 | [string] 35 | $ToRole, 36 | 37 | # The command line to run 38 | [Parameter(Mandatory=$true,ParameterSetName='CommandLine')] 39 | [string] 40 | $CommandLine, 41 | 42 | # The ScriptBlock to run. 43 | [Parameter(Mandatory=$true,ParameterSetName='ScriptBlock')] 44 | [ScriptBlock] 45 | $ScriptBlock, 46 | 47 | # The parameter to be passed to the script block 48 | [Parameter(ParameterSetName='ScriptBlock')] 49 | [Hashtable] 50 | $Parameter, 51 | 52 | # The task type. 53 | [ValidateSet('Simple', 'Background', 'Foreground')] 54 | [string] 55 | $TaskType = 'Simple', 56 | 57 | # If set, the task will be run elevated 58 | [switch] 59 | $Elevated, 60 | 61 | # If set, returns the service definition XML up to this point as a string 62 | [switch] 63 | $AsString 64 | ) 65 | 66 | process { 67 | $taskType = $taskType.ToLower() 68 | 69 | # Resolve the role if it set, create the role if it doesn't exist, and track it if they assume the last item. 70 | $roles = @($ServiceDefinition.ServiceDefinition.WebRole), @($ServiceDefinition.ServiceDefinition.WorkerRole) + @($ServiceDefinition.ServiceDefinition.VirtualMachineRole) 71 | $xmlNamespace = @{'ServiceDefinition'='http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition'} 72 | $selectXmlParams = @{ 73 | XPath = '//ServiceDefinition:WebRole|//ServiceDefinition:WorkerRole|//ServiceDefinition:VirtualMachineRole' 74 | Namespace = $xmlNamespace 75 | } 76 | $roles = @(Select-Xml -Xml $ServiceDefinition @selectXmlParams | 77 | Select-Object -ExpandProperty Node) 78 | if (-not $roles) { 79 | $ServiceDefinition = $ServiceDefinition | 80 | Add-AzureRole -RoleName "WebRole1" 81 | 82 | $roles = @(Select-Xml -Xml $ServiceDefinition @selectXmlParams | 83 | Select-Object -ExpandProperty Node) 84 | } 85 | 86 | if ($roles.Count -gt 1) { 87 | if ($ToRole) { 88 | } else { 89 | $role = $roles[-1] 90 | } 91 | } else { 92 | if ($ToRole) { 93 | if ($roles[0].Name -eq $ToRole) { 94 | $role = $roles[0] 95 | } else { 96 | $role = $null 97 | } 98 | } else { 99 | $role = $roles[0] 100 | } 101 | } 102 | 103 | if (-not $role) { return } 104 | 105 | if (-not $role.Startup) { 106 | $role.InnerXml += "" 107 | } 108 | 109 | $startupNode = Select-Xml -Xml $role -Namespace $xmlNamespace -XPath '//ServiceDefinition:Startup' | 110 | Select-Object -ExpandProperty Node -First 1 111 | 112 | $execContext= if ($elevated) { 'elevated' } else { 'limited' } 113 | if ($psCmdlet.ParameterSetName -eq 'CommandLine') { 114 | $startupNode.InnerXml += "" 115 | } elseif ($psCmdlet.ParameterSetName -eq 'ScriptBlock') { 116 | $parameterChunk = if ($parameter) { 117 | $parameterChunk = "" 118 | foreach ($kv in $parameter.GetEnumerator()) { 119 | if ($kv.Value) { 120 | $parameterChunk += "" 121 | } else { 122 | $parameterChunk += "" 123 | } 124 | } 125 | $parameterChunk += "" 126 | } else { ""} 127 | $startupNode.InnerXml += " 128 | 129 | $([Security.SecurityElement]::Escape($ScriptBlock)) 130 | 131 | $parameterChunk 132 | " 133 | } 134 | 135 | } 136 | 137 | end { 138 | if ($AsString) { 139 | $strWrite = New-Object IO.StringWriter 140 | $serviceDefinition.Save($strWrite) 141 | return "$strWrite" 142 | } else { 143 | $serviceDefinition 144 | } 145 | 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /Pipeworks/Add-EC2.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Pipeworks/Add-EC2.ps1 -------------------------------------------------------------------------------- /Pipeworks/Add-SQLTable.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Pipeworks/Add-SQLTable.ps1 -------------------------------------------------------------------------------- /Pipeworks/Add-SecureSetting.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Pipeworks/Add-SecureSetting.ps1 -------------------------------------------------------------------------------- /Pipeworks/Assets/Pipeworks_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwj7738/PowershellModules/ecb7e3629a10f43fb61cf3996725eca40f7c93d3/Pipeworks/Assets/Pipeworks_48.png --------------------------------------------------------------------------------