├── CSharpForPowerShell
├── Get-Assemblies.ps1
├── Get-AssemblyUsingStatement.ps1
├── MyCore
│ └── Utils
│ │ ├── MyCore-Utils-Download.ps1
│ │ ├── MyCore-Utils-ObjectManip.ps1
│ │ └── MyCore-Utils-Zip.ps1
├── New-GenericObject.ps1
├── PaulD
│ └── Extensions
│ │ └── PaulD-Extensions-IEnumerable.ps1
└── WPFUtils
│ └── DataGrids
│ └── WPFUtils-DataGrids-Cells.ps1
├── GUI_Apps
├── Get-CallMetrics_Master_Function
│ ├── Archive
│ │ └── Get-CallMetrics.ps1
│ └── Get-CallMetrics.ps1
├── RunspaceTemplate-ForGUIs.ps1
├── WPF
│ ├── Get-CallMetrics
│ │ ├── AllCSharp
│ │ │ └── ParseCallMetrics
│ │ │ │ ├── .vs
│ │ │ │ ├── ParseCallMetrics
│ │ │ │ │ └── v15
│ │ │ │ │ │ ├── .suo
│ │ │ │ │ │ └── sqlite3
│ │ │ │ │ │ └── storage.ide
│ │ │ │ ├── VSWorkspaceState.json
│ │ │ │ └── slnx.sqlite
│ │ │ │ ├── ParseCallMetrics.sln
│ │ │ │ └── ParseCallMetrics
│ │ │ │ ├── App.config
│ │ │ │ ├── App.xaml
│ │ │ │ ├── App.xaml.cs
│ │ │ │ ├── MainWindow.xaml
│ │ │ │ ├── MainWindow.xaml.cs
│ │ │ │ ├── ParseCallMetrics.csproj
│ │ │ │ ├── ParseCallMetrics.csproj.user
│ │ │ │ ├── Properties
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.Designer.cs
│ │ │ │ ├── Resources.resx
│ │ │ │ ├── Settings.Designer.cs
│ │ │ │ └── Settings.settings
│ │ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ │ ├── Get-CallMetrics.ps1
│ │ │ │ │ ├── ParseCallMetrics.exe
│ │ │ │ │ ├── ParseCallMetrics.exe.config
│ │ │ │ │ └── ParseCallMetrics.pdb
│ │ │ │ └── obj
│ │ │ │ ├── Debug
│ │ │ │ ├── App.g.cs
│ │ │ │ ├── App.g.i.cs
│ │ │ │ ├── CoreCompileInputs.cache
│ │ │ │ ├── DesignTimeResolveAssemblyReferences.cache
│ │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ │ ├── MainWindow.g.cs
│ │ │ │ ├── MainWindow.g.i.cs
│ │ │ │ ├── ParseCallMetrics.Properties.Resources.resources
│ │ │ │ ├── ParseCallMetrics.csproj.CoreCompileInputs.cache
│ │ │ │ ├── ParseCallMetrics.csproj.FileListAbsolute.txt
│ │ │ │ ├── ParseCallMetrics.csproj.GenerateResource.Cache
│ │ │ │ ├── ParseCallMetrics.csprojResolveAssemblyReference.cache
│ │ │ │ ├── ParseCallMetrics.exe
│ │ │ │ ├── ParseCallMetrics.g.resources
│ │ │ │ ├── ParseCallMetrics.pdb
│ │ │ │ ├── ParseCallMetrics_MarkupCompile.cache
│ │ │ │ ├── ParseCallMetrics_MarkupCompile.i.cache
│ │ │ │ ├── ParseCallMetrics_MarkupCompile.i.lref
│ │ │ │ ├── ParseCallMetrics_MarkupCompile.lref
│ │ │ │ ├── TempPE
│ │ │ │ │ └── Properties.Resources.Designer.cs.dll
│ │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ │ │ └── Release
│ │ │ │ ├── App.g.cs
│ │ │ │ ├── CoreCompileInputs.cache
│ │ │ │ ├── MainWindow.g.cs
│ │ │ │ ├── ParseCallMetrics_MarkupCompile.cache
│ │ │ │ └── ParseCallMetrics_MarkupCompile.lref
│ │ └── XAML-GUI_PowerShell_Everything_Else
│ │ │ ├── Get-CallMetrics.ps1
│ │ │ ├── Get-CallMetrics_Launcher.lnk
│ │ │ └── WPFExample.ps1
│ └── NoClutter-NetworkMonitor
│ │ ├── NoClutter-NetworkMonitor.ps1
│ │ ├── NoClutter-NetworkMonitor.zip
│ │ └── NoClutter-NetworkMonitorForXMLOnly
│ │ ├── .vs
│ │ └── NoClutter-NetworkMonitorForXMLOnly
│ │ │ └── v15
│ │ │ ├── .suo
│ │ │ └── sqlite3
│ │ │ └── storage.ide
│ │ ├── NoClutter-NetworkMonitorForXMLOnly.sln
│ │ └── NoClutter-NetworkMonitorForXMLOnly
│ │ ├── App.config
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── MainWindow.xaml
│ │ ├── MainWindow.xaml.cs
│ │ ├── NoClutter-NetworkMonitorForXMLOnly.csproj
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ └── obj
│ │ └── Debug
│ │ ├── App.g.i.cs
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── MainWindow.g.i.cs
│ │ ├── NoClutter-NetworkMonitorForXMLOnly.csproj.CoreCompileInputs.cache
│ │ ├── NoClutter-NetworkMonitorForXMLOnly_MarkupCompile.i.cache
│ │ ├── NoClutter-NetworkMonitorForXMLOnly_MarkupCompile.i.lref
│ │ ├── TempPE
│ │ └── Properties.Resources.Designer.cs.dll
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
└── WinForms
│ ├── Get-CallMetrics.ps1
│ ├── Get-CallMetrics_Launcher.lnk
│ └── GetCallMetricsDiagnosis
│ ├── Get-CallMetrics.ps1
│ ├── Get-CallMetrics_Launcher.lnk
│ └── Get-CallMetrics_LauncherForDiagnosis.lnk
├── IDE
├── SublimeSnippets
│ ├── $(...) Complex Subexpression.sublime-snippet
│ ├── AddToPath.sublime-snippet
│ ├── Add_New_Type_Accelerator.sublime-snippet
│ ├── Array.sublime-snippet
│ ├── Background Job.sublime-snippet
│ ├── Begin {...}.sublime-snippet
│ ├── BoundParams.sublime-snippet
│ ├── Catch {...}.sublime-snippet
│ ├── CmdletBinding.sublime-snippet
│ ├── Comment Block.sublime-snippet
│ ├── Convert_String_To_ScriptBlock.sublime-snippet
│ ├── Create Temp File.sublime-snippet
│ ├── Create_HTML_DOM_Object.sublime-snippet
│ ├── Current Script Path.sublime-snippet
│ ├── CurrentUser.sublime-snippet
│ ├── DSC Class-Based Resource Provider.sublime-snippet
│ ├── DSC Configuration Simple.sublime-snippet
│ ├── DSC Function-Based Resource Provider.sublime-snippet
│ ├── Do Until.sublime-snippet
│ ├── Do While.sublime-snippet
│ ├── Else {...}.sublime-snippet
│ ├── Elseif {...}.sublime-snippet
│ ├── Enable script debug stepping.sublime-snippet
│ ├── End {...}.sublime-snippet
│ ├── EnvSpecialFolder.sublime-snippet
│ ├── Error Handling.sublime-snippet
│ ├── Finally {...}.sublime-snippet
│ ├── Find Valid Paths.sublime-snippet
│ ├── For Loop.sublime-snippet
│ ├── ForEach Loop.sublime-snippet
│ ├── Function Block Advanced Complete.sublime-snippet
│ ├── Function Block Advanced.sublime-snippet
│ ├── Function Block Simple.sublime-snippet
│ ├── GUI_Choose_From_List.sublime-snippet
│ ├── GUI_Message_Box.sublime-snippet
│ ├── GUI_Message_Box_YesNo.sublime-snippet
│ ├── Get Registered COM Classes.sublime-snippet
│ ├── Get-Member_Everything_For_Real.sublime-snippet
│ ├── Hashtable.sublime-snippet
│ ├── Help Block.sublime-snippet
│ ├── Heredoc string (double quoted).sublime-snippet
│ ├── Heredoc string (single quoted).sublime-snippet
│ ├── If {...} Else {...}.sublime-snippet
│ ├── If {...}.sublime-snippet
│ ├── InstallMSI.sublime-snippet
│ ├── List_Type_Accelerators.sublime-snippet
│ ├── ModuleManifest.sublime-snippet
│ ├── New Filter.sublime-snippet
│ ├── Nuget-Package_Download.sublime-snippet
│ ├── PSCred.sublime-snippet
│ ├── PSObject.sublime-snippet
│ ├── Params(...).sublime-snippet
│ ├── Ping_w_PowerShell.sublime-snippet
│ ├── Process {...}.sublime-snippet
│ ├── ProcessStartCapture.sublime-snippet
│ ├── Proxy Function.sublime-snippet
│ ├── RandomString.sublime-snippet
│ ├── RegistryManagement.sublime-snippet
│ ├── Require Snapin.sublime-snippet
│ ├── Require Version.sublime-snippet
│ ├── Require.sublime-snippet
│ ├── Resolve_Path.sublime-snippet
│ ├── Run_CSharp_Code.sublime-snippet
│ ├── SecureString_Create_and_Reverse.sublime-snippet
│ ├── Send Email.sublime-snippet
│ ├── Send Keyboard Input.sublime-snippet
│ ├── ShouldProcess.sublime-snippet
│ ├── Splat_Params.sublime-snippet
│ ├── Split File Path.sublime-snippet
│ ├── Split String On Character.sublime-snippet
│ ├── Switch.sublime-snippet
│ ├── Test Connection.sublime-snippet
│ ├── WinRM_Config.sublime-snippet
│ ├── WinSCP.sublime-snippet
│ ├── try-catch-finally.sublime-snippet
│ ├── try-catch.sublime-snippet
│ ├── try-finally.sublime-snippet
│ └── while.sublime-snippet
└── VisualStudioCodeSnippets
│ └── powershell.json
├── License.md
├── MyFunctions
├── Bootstrap-EtcdCluster.ps1
├── Build-VisualStudioProject.ps1
├── Change-User.ps1
├── Check-InstalledPrograms.ps1
├── Create-PFXFromOpenSSLCerts.ps1
├── DueForRefactor
│ ├── Check-SameObject.ps1
│ ├── Convert-Frombase64.ps1
│ ├── Convert-SSLKey.ps1
│ ├── Convert-ToBase64.ps1
│ ├── Find-WebsiteText.ps1
│ ├── Generate-CertTemplate.ps1
│ ├── Generate-Certificate.ps1
│ ├── Generate-RandomString.ps1
│ ├── Get-AllDiskInfo.ps1
│ ├── Get-PfxCertificateBetter.ps1
│ ├── New-AWSSSHKey.ps1
│ ├── New-GoogleSearch.ps1
│ ├── New-HashTableFromHTML.ps1
│ ├── New-VNCConnection.ps1
│ ├── Register-FileIOWatcher.ps1
│ └── Send-EmailOnPublicIPChange.ps1
├── Enable-RemoteDesktop.ps1
├── Enable-WinRMViaRPC.ps1
├── Extract-PFXCerts.ps1
├── Get-DomainController.ps1
├── Get-GuestVMAndHypervisorInfo.ps1
├── Get-LDAPCert.ps1
├── Get-PrivateKeyProperty.ps1
├── Get-SpecialFolder.ps1
├── Get-UserAdminRights.ps1
├── Get-WebSiteText.ps1
├── Get-WorkingCredentials.ps1
├── Get-vSwitchAllRelatedInfo.ps1
├── Install-ChocolateyCmdLine.ps1
├── Install-DotNet472.ps1
├── Install-Program.ps1
├── Install-RSAT.ps1
├── Install-Vim.ps1
├── Join-NanoServerToDomain.ps1
├── Load-ModulesFrom.ps1
├── Manual-PSGalleryModuleInstall.ps1
├── New-DomainController.ps1
├── New-PKIWebServerCert.ps1
├── New-RemoteAndroidSession.ps1
├── New-RootCA.ps1
├── New-SelfDeletingTask.ps1
├── New-Shortcut.ps1
├── New-SubCACertReq.ps1
├── New-SubordinateCA.ps1
├── New-WebsocketSession.ps1
├── OneOffAssistance
│ ├── Download-WebSocketsSharp.ps1
│ ├── Get-SonicWallRules.ps1
│ ├── Mount-UncPath.ps1
│ └── WPFExample.ps1
├── PowerShellCore_Compatible
│ ├── Cache-SudoPwd.ps1
│ ├── Download-NuGetPackage.ps1
│ ├── Get-Elevation.ps1
│ ├── Get-FileLockProcess.ps1
│ ├── Get-FileSystemTreeAsJson.ps1
│ ├── Get-NativePath.ps1
│ ├── Get-NetIPAddressForLinux.ps1
│ ├── Get-NetworkInfo.ps1
│ ├── Get-NetworkInfoCSharp.ps1
│ ├── Get-NewtonsoftJsonNuget.ps1
│ ├── Get-WinPSInCore.ps1
│ ├── Install-HTMLAgilityPack.ps1
│ ├── Join-LinuxToAD.ps1
│ ├── New-Runspace.ps1
│ ├── New-SSHKey.ps1
│ ├── New-UniqueString.ps1
│ ├── PSCompatibilityFunctions.ps1
│ ├── Pause-ForWarning.ps1
│ ├── Process-ICM.ps1
│ ├── Refresh-ChocolateyEnv.ps1
│ ├── Resolve-Host.ps1
│ ├── SudoExperiment
│ │ ├── AddMySudoPwd.ps1
│ │ ├── GetElevation.ps1
│ │ ├── GetLinuxOctalPermissions.ps1
│ │ ├── GetMySudoStatus.ps1
│ │ ├── NewCronToAddSudoPwd.ps1
│ │ └── RemoveMySudoPwd.ps1
│ ├── Unzip-File.ps1
│ ├── Update-PackageManagement.ps1
│ └── Update-PowerShellCore.ps1
├── Reflect-Cmdlet.ps1
├── Run-Binary.ps1
├── Set-AWSEnvHelper.ps1
├── Split-LogFiles.ps1
├── Summarize-Text.ps1
├── Test-LDAP.ps1
├── Test-Port.ps1
└── Uninstall-MSU.ps1
├── MyModules
├── AnacondaEnv
│ └── AnacondaEnv.psm1
├── BootstrapRemoteHost.psm1
├── ContextMenu.psm1
├── EncryptDecrypt
│ ├── EncryptDecrypt.psd1
│ └── EncryptDecrypt.psm1
├── GitEnv
│ ├── GitEnv.psd1
│ └── GitEnv.psm1
├── HexOps
│ ├── HexOps.psd1
│ └── HexOps.psm1
├── MiniServeModule.psm1
├── Network-SnifferTools
│ ├── Network-SnifferTools.psd1
│ └── Network-SnifferTools.psm1
├── NetworkTools
│ └── NetworkTools.psm1
├── Permutations
│ ├── Permutations.psd1
│ └── Permutations.psm1
├── SplashServer
│ └── SplashServer.psm1
├── Start-PSLogging
│ ├── Start-PSLogging.psd1
│ └── Start-PSLogging.psm1
├── Sudo
│ ├── Sudo.psd1
│ └── Sudo.psm1
├── TTYDModule.psm1
├── UserSessionEx
│ ├── UserSessionEx.psd1
│ ├── UserSessionEx.psm1
│ └── en-US
│ │ └── about_UserSessionEx.help.txt
├── WinRM-Environment
│ ├── Archive
│ │ └── ModulePreReqs.ps1
│ ├── WinRM-Environment.psd1
│ └── WinRM-Environment.psm1
└── WinSSH
│ ├── WinSSH.psd1
│ └── WinSSH.psm1
├── MyScripts
├── Add-NewMethodToAllObjects.ps1
├── Add-OneDriveRightClickMenu.ps1
├── Bootstrap-RemoteHostViaSSH.ps1
├── Bootstrap-RemoteHostViaSSHWithPSRemoting.ps1
├── Enable-PromiscuousMode.ps1
├── Get-DiskInfo.ps1
├── Install-NeovimDebian.sh
├── Install-NoMachineWindows.ps1
├── Install-Pwsh.ps1
├── Install-SSHD.ps1
├── Install-ZeroTier.ps1
├── Invoke-365FileUpload.ps1
├── Invoke-SharePointLibrarySyncCmdBuilder.ps1
├── Invoke-WebServer.ps1
├── NOTES
│ └── UsingMiniServe.ps1
├── New-ModernGmailEmail.ps1
├── Start-VSCodeRemote.ps1
├── Upgrade-Winget.ps1
├── compare_dirs.sh
├── deduplicate.sh
├── linux_pwsh_profile_2023.ps1
└── profile_2023.ps1
├── README.md
├── ThirdPartyRefactors
├── Functions
│ ├── Get-HVEventLog.ps1
│ ├── Manage-StoredCredentials.ps1
│ ├── New-SelfSignedCertificateEx.ps1
│ └── Start-Sniffer.ps1
└── Modules
│ └── Await
│ ├── Await.psd1
│ ├── Await.psm1
│ ├── AwaitDriver.cs
│ ├── PSGetModuleInfo.xml
│ └── Tests
│ └── Await.Tests.ps1
└── UDProjects
└── Testing
├── Get-CustomPUD.ps1
├── Get-CustomPUDIATest.ps1
├── Get-CustomPUDWinCompat.ps1
├── Get-PUDNetMon.ps1
├── Get-PUDNetworkMonitor.ps1
└── Test-UD.ps1
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/ParseCallMetrics/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/ParseCallMetrics/v15/.suo
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/ParseCallMetrics/v15/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/ParseCallMetrics/v15/sqlite3/storage.ide
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/VSWorkspaceState.json:
--------------------------------------------------------------------------------
1 | {
2 | "ExpandedNodes": [
3 | ""
4 | ],
5 | "PreviewInSolutionExplorer": false
6 | }
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/slnx.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/.vs/slnx.sqlite
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26228.4
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParseCallMetrics", "ParseCallMetrics\ParseCallMetrics.csproj", "{379F124F-CA15-4352-BBA7-E13D32E2D1B8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {379F124F-CA15-4352-BBA7-E13D32E2D1B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {379F124F-CA15-4352-BBA7-E13D32E2D1B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {379F124F-CA15-4352-BBA7-E13D32E2D1B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {379F124F-CA15-4352-BBA7-E13D32E2D1B8}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace ParseCallMetrics
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/ParseCallMetrics.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {379F124F-CA15-4352-BBA7-E13D32E2D1B8}
8 | WinExe
9 | ParseCallMetrics
10 | ParseCallMetrics
11 | v4.5.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 4.0
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | MSBuild:Compile
56 | Designer
57 |
58 |
59 | MSBuild:Compile
60 | Designer
61 |
62 |
63 | App.xaml
64 | Code
65 |
66 |
67 | MainWindow.xaml
68 | Code
69 |
70 |
71 |
72 |
73 | Code
74 |
75 |
76 | True
77 | True
78 | Resources.resx
79 |
80 |
81 | True
82 | Settings.settings
83 | True
84 |
85 |
86 | ResXFileCodeGenerator
87 | Resources.Designer.cs
88 |
89 |
90 | SettingsSingleFileGenerator
91 | Settings.Designer.cs
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/ParseCallMetrics.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("ParseCallMetrics")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("ParseCallMetrics")]
15 | [assembly: AssemblyCopyright("Copyright © 2017")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ParseCallMetrics.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ParseCallMetrics.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ParseCallMetrics.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/bin/Debug/ParseCallMetrics.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/bin/Debug/ParseCallMetrics.exe
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/bin/Debug/ParseCallMetrics.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/bin/Debug/ParseCallMetrics.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/bin/Debug/ParseCallMetrics.pdb
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/App.g.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "DC90E679D59D9F7A284C1CF5EF36F538"
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.42000
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using ParseCallMetrics;
13 | using System;
14 | using System.Diagnostics;
15 | using System.Windows;
16 | using System.Windows.Automation;
17 | using System.Windows.Controls;
18 | using System.Windows.Controls.Primitives;
19 | using System.Windows.Data;
20 | using System.Windows.Documents;
21 | using System.Windows.Ink;
22 | using System.Windows.Input;
23 | using System.Windows.Markup;
24 | using System.Windows.Media;
25 | using System.Windows.Media.Animation;
26 | using System.Windows.Media.Effects;
27 | using System.Windows.Media.Imaging;
28 | using System.Windows.Media.Media3D;
29 | using System.Windows.Media.TextFormatting;
30 | using System.Windows.Navigation;
31 | using System.Windows.Shapes;
32 | using System.Windows.Shell;
33 |
34 |
35 | namespace ParseCallMetrics {
36 |
37 |
38 | ///
39 | /// App
40 | ///
41 | public partial class App : System.Windows.Application {
42 |
43 | ///
44 | /// InitializeComponent
45 | ///
46 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
47 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
48 | public void InitializeComponent() {
49 |
50 | #line 5 "..\..\App.xaml"
51 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
52 |
53 | #line default
54 | #line hidden
55 | }
56 |
57 | ///
58 | /// Application Entry Point.
59 | ///
60 | [System.STAThreadAttribute()]
61 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
62 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
63 | public static void Main() {
64 | ParseCallMetrics.App app = new ParseCallMetrics.App();
65 | app.InitializeComponent();
66 | app.Run();
67 | }
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/App.g.i.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "DC90E679D59D9F7A284C1CF5EF36F538"
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.42000
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using ParseCallMetrics;
13 | using System;
14 | using System.Diagnostics;
15 | using System.Windows;
16 | using System.Windows.Automation;
17 | using System.Windows.Controls;
18 | using System.Windows.Controls.Primitives;
19 | using System.Windows.Data;
20 | using System.Windows.Documents;
21 | using System.Windows.Ink;
22 | using System.Windows.Input;
23 | using System.Windows.Markup;
24 | using System.Windows.Media;
25 | using System.Windows.Media.Animation;
26 | using System.Windows.Media.Effects;
27 | using System.Windows.Media.Imaging;
28 | using System.Windows.Media.Media3D;
29 | using System.Windows.Media.TextFormatting;
30 | using System.Windows.Navigation;
31 | using System.Windows.Shapes;
32 | using System.Windows.Shell;
33 |
34 |
35 | namespace ParseCallMetrics {
36 |
37 |
38 | ///
39 | /// App
40 | ///
41 | public partial class App : System.Windows.Application {
42 |
43 | ///
44 | /// InitializeComponent
45 | ///
46 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
47 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
48 | public void InitializeComponent() {
49 |
50 | #line 5 "..\..\App.xaml"
51 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
52 |
53 | #line default
54 | #line hidden
55 | }
56 |
57 | ///
58 | /// Application Entry Point.
59 | ///
60 | [System.STAThreadAttribute()]
61 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
62 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
63 | public static void Main() {
64 | ParseCallMetrics.App app = new ParseCallMetrics.App();
65 | app.InitializeComponent();
66 | app.Run();
67 | }
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 7d5c20f1bf5d0f9133bb62a18727c54a727e74da
2 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/DesignTimeResolveAssemblyReferences.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/DesignTimeResolveAssemblyReferences.cache
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.Properties.Resources.resources
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 66e1ee3489f401962b8c8c1d35547fe00539d772
2 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics.csprojResolveAssemblyReference.cache
2 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\MainWindow.g.cs
3 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\App.g.cs
4 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics_MarkupCompile.cache
5 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics_MarkupCompile.lref
6 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\bin\Debug\ParseCallMetrics.exe.config
7 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\bin\Debug\ParseCallMetrics.exe
8 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\bin\Debug\ParseCallMetrics.pdb
9 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\MainWindow.baml
10 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics.g.resources
11 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics.Properties.Resources.resources
12 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics.csproj.GenerateResource.Cache
13 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics.exe
14 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Debug\ParseCallMetrics.pdb
15 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.csproj.GenerateResource.Cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.csproj.GenerateResource.Cache
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.exe
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.g.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.g.resources
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics.pdb
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics_MarkupCompile.cache:
--------------------------------------------------------------------------------
1 | ParseCallMetrics
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | c:\Users\testadmin\Documents\GitHub\misc-powershell\GUI_Apps\WPF\Get-CallMetrics\AllCSharp\ParseCallMetrics\ParseCallMetrics\obj\Debug\
8 | ParseCallMetrics
9 | none
10 | false
11 | DEBUG;TRACE
12 | c:\Users\testadmin\Documents\GitHub\misc-powershell\GUI_Apps\WPF\Get-CallMetrics\AllCSharp\ParseCallMetrics\ParseCallMetrics\App.xaml
13 | 1219584333
14 |
15 | 91270926673
16 | 14-2035215372
17 | MainWindow.xaml;
18 |
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics_MarkupCompile.i.cache:
--------------------------------------------------------------------------------
1 | ParseCallMetrics
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | V:\powershell\PowerShellDrafts\GUI_Apps\WPF\Get-CallMetrics\AllCSharp\ParseCallMetrics\ParseCallMetrics\obj\Debug\
8 | ParseCallMetrics
9 | none
10 | false
11 | DEBUG;TRACE
12 | V:\powershell\PowerShellDrafts\GUI_Apps\WPF\Get-CallMetrics\AllCSharp\ParseCallMetrics\ParseCallMetrics\App.xaml
13 | 11151548125
14 |
15 | 9-1488391048
16 | 14-1787462521
17 | MainWindow.xaml;
18 |
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics_MarkupCompile.i.lref:
--------------------------------------------------------------------------------
1 |
2 |
3 | FV:\powershell\PowerShellDrafts\GUI_Apps\WPF\Get-CallMetrics\AllCSharp\ParseCallMetrics\ParseCallMetrics\MainWindow.xaml;;
4 |
5 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/ParseCallMetrics_MarkupCompile.lref:
--------------------------------------------------------------------------------
1 |
2 |
3 | Fc:\Users\testadmin\Documents\GitHub\misc-powershell\GUI_Apps\WPF\Get-CallMetrics\AllCSharp\ParseCallMetrics\ParseCallMetrics\MainWindow.xaml;;
4 |
5 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Release/App.g.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "DC90E679D59D9F7A284C1CF5EF36F538"
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.42000
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using ParseCallMetrics;
13 | using System;
14 | using System.Diagnostics;
15 | using System.Windows;
16 | using System.Windows.Automation;
17 | using System.Windows.Controls;
18 | using System.Windows.Controls.Primitives;
19 | using System.Windows.Data;
20 | using System.Windows.Documents;
21 | using System.Windows.Ink;
22 | using System.Windows.Input;
23 | using System.Windows.Markup;
24 | using System.Windows.Media;
25 | using System.Windows.Media.Animation;
26 | using System.Windows.Media.Effects;
27 | using System.Windows.Media.Imaging;
28 | using System.Windows.Media.Media3D;
29 | using System.Windows.Media.TextFormatting;
30 | using System.Windows.Navigation;
31 | using System.Windows.Shapes;
32 | using System.Windows.Shell;
33 |
34 |
35 | namespace ParseCallMetrics {
36 |
37 |
38 | ///
39 | /// App
40 | ///
41 | public partial class App : System.Windows.Application {
42 |
43 | ///
44 | /// InitializeComponent
45 | ///
46 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
47 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
48 | public void InitializeComponent() {
49 |
50 | #line 5 "..\..\App.xaml"
51 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
52 |
53 | #line default
54 | #line hidden
55 | }
56 |
57 | ///
58 | /// Application Entry Point.
59 | ///
60 | [System.STAThreadAttribute()]
61 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
62 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
63 | public static void Main() {
64 | ParseCallMetrics.App app = new ParseCallMetrics.App();
65 | app.InitializeComponent();
66 | app.Run();
67 | }
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Release/CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 987dc14dbc25648cf57c318382e4c95ccc4193c6
2 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Release/ParseCallMetrics_MarkupCompile.cache:
--------------------------------------------------------------------------------
1 | ParseCallMetrics
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\obj\Release\
8 | ParseCallMetrics
9 | none
10 | false
11 | TRACE
12 | C:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\App.xaml
13 | 11151548125
14 |
15 | 5-2017746502
16 | 14-1787462521
17 | MainWindow.xaml;
18 |
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/AllCSharp/ParseCallMetrics/ParseCallMetrics/obj/Release/ParseCallMetrics_MarkupCompile.lref:
--------------------------------------------------------------------------------
1 |
2 |
3 | FC:\Scripts\powershell\WPF\ParseCallMetrics\ParseCallMetrics\MainWindow.xaml;;
4 |
5 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/Get-CallMetrics/XAML-GUI_PowerShell_Everything_Else/Get-CallMetrics_Launcher.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/Get-CallMetrics/XAML-GUI_PowerShell_Everything_Else/Get-CallMetrics_Launcher.lnk
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitor.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitor.zip
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/.vs/NoClutter-NetworkMonitorForXMLOnly/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/.vs/NoClutter-NetworkMonitorForXMLOnly/v15/.suo
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/.vs/NoClutter-NetworkMonitorForXMLOnly/v15/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/.vs/NoClutter-NetworkMonitorForXMLOnly/v15/sqlite3/storage.ide
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoClutter-NetworkMonitorForXMLOnly", "NoClutter-NetworkMonitorForXMLOnly\NoClutter-NetworkMonitorForXMLOnly.csproj", "{B3B59BAD-39AA-4DB3-A4D4-91EBA101148C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {B3B59BAD-39AA-4DB3-A4D4-91EBA101148C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {B3B59BAD-39AA-4DB3-A4D4-91EBA101148C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {B3B59BAD-39AA-4DB3-A4D4-91EBA101148C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {B3B59BAD-39AA-4DB3-A4D4-91EBA101148C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {9FD58A37-BA7F-4303-99DA-F4E0FD79CDAA}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace NoClutter_NetworkMonitorForXMLOnly
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace NoClutter_NetworkMonitorForXMLOnly
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {B3B59BAD-39AA-4DB3-A4D4-91EBA101148C}
8 | WinExe
9 | NoClutter_NetworkMonitorForXMLOnly
10 | NoClutter-NetworkMonitorForXMLOnly
11 | v4.6.1
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | 4.0
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | MSBuild:Compile
55 | Designer
56 |
57 |
58 | MSBuild:Compile
59 | Designer
60 |
61 |
62 | App.xaml
63 | Code
64 |
65 |
66 | MainWindow.xaml
67 | Code
68 |
69 |
70 |
71 |
72 | Code
73 |
74 |
75 | True
76 | True
77 | Resources.resx
78 |
79 |
80 | True
81 | Settings.settings
82 | True
83 |
84 |
85 | ResXFileCodeGenerator
86 | Resources.Designer.cs
87 |
88 |
89 | SettingsSingleFileGenerator
90 | Settings.Designer.cs
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("NoClutter-NetworkMonitorForXMLOnly")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("NoClutter-NetworkMonitorForXMLOnly")]
15 | [assembly: AssemblyCopyright("Copyright © 2017")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace NoClutter_NetworkMonitorForXMLOnly.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NoClutter_NetworkMonitorForXMLOnly.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace NoClutter_NetworkMonitorForXMLOnly.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/App.g.i.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "EC651277991587EC65137F457465EB96"
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.42000
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using NoClutter_NetworkMonitorForXMLOnly;
13 | using System;
14 | using System.Diagnostics;
15 | using System.Windows;
16 | using System.Windows.Automation;
17 | using System.Windows.Controls;
18 | using System.Windows.Controls.Primitives;
19 | using System.Windows.Data;
20 | using System.Windows.Documents;
21 | using System.Windows.Ink;
22 | using System.Windows.Input;
23 | using System.Windows.Markup;
24 | using System.Windows.Media;
25 | using System.Windows.Media.Animation;
26 | using System.Windows.Media.Effects;
27 | using System.Windows.Media.Imaging;
28 | using System.Windows.Media.Media3D;
29 | using System.Windows.Media.TextFormatting;
30 | using System.Windows.Navigation;
31 | using System.Windows.Shapes;
32 | using System.Windows.Shell;
33 |
34 |
35 | namespace NoClutter_NetworkMonitorForXMLOnly {
36 |
37 |
38 | ///
39 | /// App
40 | ///
41 | public partial class App : System.Windows.Application {
42 |
43 | ///
44 | /// InitializeComponent
45 | ///
46 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
47 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
48 | public void InitializeComponent() {
49 |
50 | #line 5 "..\..\App.xaml"
51 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
52 |
53 | #line default
54 | #line hidden
55 | }
56 |
57 | ///
58 | /// Application Entry Point.
59 | ///
60 | [System.STAThreadAttribute()]
61 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
62 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
63 | public static void Main() {
64 | NoClutter_NetworkMonitorForXMLOnly.App app = new NoClutter_NetworkMonitorForXMLOnly.App();
65 | app.InitializeComponent();
66 | app.Run();
67 | }
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/MainWindow.g.i.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "97E9234B3C4E7C974E642CB0BAB1E57E"
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.42000
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using NoClutter_NetworkMonitorForXMLOnly;
13 | using System;
14 | using System.Diagnostics;
15 | using System.Windows;
16 | using System.Windows.Automation;
17 | using System.Windows.Controls;
18 | using System.Windows.Controls.Primitives;
19 | using System.Windows.Data;
20 | using System.Windows.Documents;
21 | using System.Windows.Ink;
22 | using System.Windows.Input;
23 | using System.Windows.Markup;
24 | using System.Windows.Media;
25 | using System.Windows.Media.Animation;
26 | using System.Windows.Media.Effects;
27 | using System.Windows.Media.Imaging;
28 | using System.Windows.Media.Media3D;
29 | using System.Windows.Media.TextFormatting;
30 | using System.Windows.Navigation;
31 | using System.Windows.Shapes;
32 | using System.Windows.Shell;
33 |
34 |
35 | namespace NoClutter_NetworkMonitorForXMLOnly
36 | {
37 |
38 |
39 | ///
40 | /// MainWindow
41 | ///
42 | public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector
43 | {
44 |
45 | private bool _contentLoaded;
46 |
47 | ///
48 | /// InitializeComponent
49 | ///
50 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
51 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
52 | public void InitializeComponent()
53 | {
54 | if (_contentLoaded)
55 | {
56 | return;
57 | }
58 | _contentLoaded = true;
59 | System.Uri resourceLocater = new System.Uri("/NoClutter-NetworkMonitorForXMLOnly;component/mainwindow.xaml", System.UriKind.Relative);
60 |
61 | #line 1 "..\..\MainWindow.xaml"
62 | System.Windows.Application.LoadComponent(this, resourceLocater);
63 |
64 | #line default
65 | #line hidden
66 | }
67 |
68 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
69 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
70 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
71 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
72 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
73 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
74 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
75 | {
76 | this._contentLoaded = true;
77 | }
78 |
79 | internal System.Windows.Window XamlMainWindow;
80 | internal System.Windows.Controls.Grid XAMLGrid;
81 | internal System.Windows.Controls.Label SubnetsLabel;
82 | internal System.Windows.Controls.TextBox SubnetsTextBox;
83 | internal System.Windows.Controls.Label InfoLabel;
84 | internal System.Windows.Controls.DataGrid InfoDataGrid;
85 | internal System.Windows.Controls.DataGridTextColumn StatusDataGridTextColumn;
86 | internal System.Windows.Controls.DataGridTextColumn HostNameDataGridTextColumn;
87 | internal System.Windows.Controls.DataGridTextColumn LastCheckedDataGridTextColumn;
88 | internal System.Windows.Controls.Label SubnetsLabelValidation;
89 | internal System.Windows.Controls.Label SubnetsLabelExample;
90 | internal System.Windows.Controls.Label SubnetsLabelExample2;
91 | internal System.Windows.Controls.Button ScanButton;
92 | internal System.Windows.Controls.Button ContinuousScanButton;
93 | internal System.Windows.Controls.Button StopButton;
94 | internal System.Windows.Controls.Label InfoScanStatusLabel;
95 | internal System.Windows.Controls.DataGridTextColumn FQDNDataGridTextColumn;
96 | internal System.Windows.Controls.Label InfoPleaseWaitLabel;
97 | internal System.Windows.Controls.Button ExportToCSVButton;
98 | internal System.Windows.Controls.CheckBox FilterUnresolvableCheckBox;
99 | internal System.Windows.Controls.Label StopButtonMsg;
100 | internal System.Windows.Controls.Label ContinuousScanError;
101 | }
102 | }
103 |
104 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/NoClutter-NetworkMonitorForXMLOnly.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | d2142ce892e00a8ae90ad30a5355c316c0ad77b9
2 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/NoClutter-NetworkMonitorForXMLOnly_MarkupCompile.i.cache:
--------------------------------------------------------------------------------
1 | NoClutter-NetworkMonitorForXMLOnly
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | V:\powershell\PowerShellDrafts\GUI_Apps\WPF\NoClutter-NetworkMonitor\NoClutter-NetworkMonitorForXMLOnly\NoClutter-NetworkMonitorForXMLOnly\obj\Debug\
8 | NoClutter_NetworkMonitorForXMLOnly
9 | none
10 | false
11 | DEBUG;TRACE
12 | V:\powershell\PowerShellDrafts\GUI_Apps\WPF\NoClutter-NetworkMonitor\NoClutter-NetworkMonitorForXMLOnly\NoClutter-NetworkMonitorForXMLOnly\App.xaml
13 | 11151548125
14 |
15 | 9838910651
16 | 131569487696
17 | MainWindow.xaml;
18 |
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/NoClutter-NetworkMonitorForXMLOnly_MarkupCompile.i.lref:
--------------------------------------------------------------------------------
1 |
2 |
3 | FV:\powershell\PowerShellDrafts\GUI_Apps\WPF\NoClutter-NetworkMonitor\NoClutter-NetworkMonitorForXMLOnly\NoClutter-NetworkMonitorForXMLOnly\MainWindow.xaml;;
4 |
5 |
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WPF/NoClutter-NetworkMonitor/NoClutter-NetworkMonitorForXMLOnly/NoClutter-NetworkMonitorForXMLOnly/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/GUI_Apps/WinForms/Get-CallMetrics_Launcher.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WinForms/Get-CallMetrics_Launcher.lnk
--------------------------------------------------------------------------------
/GUI_Apps/WinForms/GetCallMetricsDiagnosis/Get-CallMetrics_Launcher.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WinForms/GetCallMetricsDiagnosis/Get-CallMetrics_Launcher.lnk
--------------------------------------------------------------------------------
/GUI_Apps/WinForms/GetCallMetricsDiagnosis/Get-CallMetrics_LauncherForDiagnosis.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/GUI_Apps/WinForms/GetCallMetricsDiagnosis/Get-CallMetrics_LauncherForDiagnosis.lnk
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/$(...) Complex Subexpression.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | sub
6 |
7 | source.powershell
8 |
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/AddToPath.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | addtopath
13 |
14 | source.powershell
15 |
16 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Add_New_Type_Accelerator.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | newaccel
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Array.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 | arr
29 |
30 | source.powershell
31 |
32 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Background Job.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | bgjobscript
7 |
8 | source.powershell
9 |
10 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Begin {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 | beg
11 |
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/BoundParams.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | boundparams
7 | source.powershell
8 |
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Catch {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | catch
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/CmdletBinding.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 | cmdbind
17 |
18 | source.powershell
19 |
20 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Comment Block.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | $0]]>
8 |
9 | comm
10 |
11 | source.powershell
12 |
13 | Comment block
14 |
15 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Convert_String_To_ScriptBlock.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 | scriptblock
18 |
19 | source.powershell
20 |
21 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Create Temp File.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 | tmp
16 |
17 | source.powershell
18 |
19 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Create_HTML_DOM_Object.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | htmlobj
24 |
25 | source.powershell
26 |
27 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Current Script Path.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | thisscriptdir
8 | source.powershell
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/CurrentUser.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | currentuser
7 |
8 | source.powershell
9 |
10 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/DSC Class-Based Resource Provider.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 | dscprovclass
27 | source.powershell
28 |
29 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/DSC Configuration Simple.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
29 |
30 | dscconfigsim
31 |
32 | source.powershell
33 |
34 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/DSC Function-Based Resource Provider.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
31 |
32 | dscprovfun
33 |
34 | source.powershell
35 |
36 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Do Until.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | dountil
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Do While.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | dowhile
10 |
11 | source.powershell
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Else {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | else
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Elseif {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 | elif
11 |
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Enable script debug stepping.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | sd
7 | source.powershell
8 |
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/End {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | end
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/EnvSpecialFolder.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | mydocs
9 |
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Error Handling.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 | error
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Finally {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | fin
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Find Valid Paths.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | :"\\/\\\\|?*]).)+((?]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'`".,<>?«»“”‘’]))"
9 |
10 | \$RegexDirectoryPath = '^(([a-zA-Z]:\\\\)|(\\\\\\\\))((?![.<>:"\\/\\\\|?*]).)+((?![.<>:"\\/|?*]).)+\$'
11 | \$RegexFilePath = '^(([a-zA-Z]:\\\\)|(\\\\\\\\))((?![.<>:"\\/\\\\|?*]).)+((?![<>:"\\/|?*]).)+((.*?\\.)|(.*?\\.[\w]+))+\$'
12 |
13 | # Finding potential Local or UNC in a block of text
14 | \$TextBlock = Get-Content \$HOME\textblock.txt
15 | \$PotentialPathsArray = \$(\$TextBlock | Select-String -Pattern \$RegexLocalOrUNCPath -AllMatches).Matches.Value
16 | \$UpdatedPotentialPathsArray = foreach (\$potentialpath in \$PotentialPathsArray) {
17 | if (\$([uri]\$potentialpath).IsAbsoluteURI -and \$(\$([uri]\$potentialpath).IsLoopBack -or \$([uri]\$potentialpath).IsUnc)) {
18 | \$potentialpath
19 | }
20 | }
21 |
22 | # Validating a string that is supposed to be a Local or UNC Path
23 | if ( !\$(\$([uri]\$TargetDir).IsAbsoluteURI -and \$(\$([uri]\$TargetDir).IsLoopBack -or \$([uri]\$TargetDir).IsUnc)) ) {
24 | Write-Verbose "\$TargetDir is not a valid directory path! Halting!"
25 | Write-Error "\$TargetDir is not a valid directory path! Halting!"
26 | \$global:FunctionResult = "1"
27 | return
28 | }
29 |
30 | # Determine if string is a URL, a local path, or a UNC path
31 | if ([uri]\$TargetString.Scheme -match "http") {
32 | Write-Host "\$TargetSring is a URL"
33 | }
34 | if ([uri]\$TargetString.Scheme -eq "file" -and [uri]\$TargetString.Host -ne \$null) {
35 | Write-Host "\$TargetString is a UNC path"
36 | }
37 | if ([uri]\$TargetString.Scheme -eq "file" -and [uri]\$TargetString.Host -eq \$null) {
38 | Write-Host "\$TargetString is a local path"
39 | }
40 |
41 | $0]]>
42 |
43 | validatepath
44 |
45 | source.powershell
46 |
47 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/For Loop.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | for
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/ForEach Loop.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | foreach
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Function Block Advanced.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
33 |
34 | Param(
35 | [Parameter(
36 | Mandatory=\$False,
37 | ParameterSetName='Parameter Set 1'
38 | )]
39 | [Alias("helperdir")]
40 | [string]\$HelperFunctionSourceDirectory = \$(Read-Host -Prompt "Please enter the full path to the directory that contains the [HELPER] script(s)/function(s)"),
41 |
42 | [Parameter(
43 | Mandatory=\$False,
44 | ParameterSetName='Parameter Set 1'
45 | )]
46 | [Alias("outdir")]
47 | [string]\$OutputDirectory = \$(Read-Host -Prompt "Please enter the full path to the directory where all output files will be written")
48 | )
49 |
50 | # Adding the Dynamic Parameter "dp1" that is revealed via tab completion if \$OutputDirectory matches "C:\\\\boop"
51 | DynamicParam {
52 | if (\$OutputDirectory -match "C:\\\\boop") {
53 | \$attributes = New-Object System.Management.Automation.ParameterAttribute
54 | \$attributes.ParameterSetName = "__AllParameterSets"
55 | \$attributes.Mandatory = \$false
56 |
57 | \$attributeCollection = New-Object -Type System.Collections.ObjectModel.Collection
58 | [System.Attribute]\$attributeCollection.Add(\$attributes)
59 |
60 | \$dynParam1 = New-Object -Type System.Management.Automation.RuntimeDefinedParameter("dp1", [Int32], \$attributeCollection)
61 |
62 | \$paramDictionary = New-Object -Type System.Management.Automation.RuntimeDefinedParameterDictionary
63 | \$paramDictionary.Add("dp1", \$dynParam1)
64 | return \$paramDictionary
65 | }
66 | }
67 |
68 | ##### REGION Helper Functions and Libraries #####
69 |
70 | ## BEGIN Sourced Helper Functions ##
71 |
72 | ## END Sourced Helper Functions ##
73 |
74 | ## BEGIN Native Helper Functions ##
75 |
76 | ## END Native Helper Functions ##
77 |
78 | ##### REGION END Helper Functions and Libraries #####
79 |
80 |
81 | ##### BEGIN Variable/Parameter Transforms and PreRun Prep #####
82 |
83 | ##### END Variable/Parameter Transforms and PreRun Prep #####
84 |
85 |
86 | ##### BEGIN Parameter Validation #####
87 |
88 | ##### END Parameter Validation #####
89 |
90 |
91 | ##### BEGIN Main Body #####
92 |
93 | ##### END Main Body #####
94 |
95 | }
96 |
97 | $0]]>
98 |
99 | funadv
100 |
101 | source.powershell
102 |
103 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Function Block Simple.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
51 |
52 | funsim
53 |
54 | source.powershell
55 |
56 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/GUI_Choose_From_List.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 | choice
15 |
16 | source.powershell
17 |
18 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/GUI_Message_Box.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | MsgBox
9 |
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/GUI_Message_Box_YesNo.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 | MsgBoxYesNo
12 |
13 | source.powershell
14 |
15 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Get Registered COM Classes.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 | comobject
18 |
19 | source.powershell
20 |
21 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Get-Member_Everything_For_Real.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | gm
7 | source.powershell
8 |
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Hashtable.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | hashtable
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Help Block.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
24 | $0]]>
25 |
26 | helpblock
27 |
28 | source.powershell
29 |
30 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Heredoc string (double quoted).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | hhere
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Heredoc string (single quoted).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | here
10 |
11 | source.powershell
12 |
13 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/If {...} Else {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 | ifelse
15 |
16 | source.powershell
17 |
18 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/If {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 | if
11 |
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/InstallMSI.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 | installmsi
23 |
24 | source.powershell
25 |
26 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/List_Type_Accelerators.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 | accel
15 |
16 | source.powershell
17 |
18 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/ModuleManifest.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | modulemanifest
24 |
25 | source.powershell
26 |
27 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/New Filter.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 | fil
11 |
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Nuget-Package_Download.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | nuget
9 |
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/PSCred.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | pscred
7 |
8 | source.powershell
9 |
10 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/PSObject.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 | psobject
14 |
15 | source.powershell
16 |
17 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Params(...).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
29 | params
30 | source.powershell
31 |
32 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Ping_w_PowerShell.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | ping
9 |
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Process {...}.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 | proc
11 |
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/ProcessStartCapture.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | processstart
21 |
22 | source.powershell
23 |
24 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Proxy Function.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
9 | <#
10 | To create a proxy function for the Get-Process cmdlet, paste the results of the following command into the body of this function and then remove this comment:
11 | [Management.Automation.ProxyCommand]::Create((New-Object Management.Automation.CommandMetaData (Get-Command Get-Process)))
12 | #>
13 | }
14 | $0]]>
15 |
16 | proxyfunction
17 |
18 | source.powershell
19 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/RandomString.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 | randstring
16 |
17 | source.powershell
18 |
19 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/RegistryManagement.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 | if (!\$(Test-Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation)) {
16 | New-Item -Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation
17 | }
18 | if (!\$(Test-Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation\AllowDefaultCredentials)) {
19 | New-Item -Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation\AllowDefaultCredentials
20 | }
21 | Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation -Name AllowFreshCredentials -Value 1 -Type DWord
22 | Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation -Name ConcatenateDefaults_AllowFresh -Value 1 -Type DWord
23 | Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation -Name 1 -Value WSMAN/\$env:COMPUTERNAME.\$(\$(Get-CimInstance -ClassName Win32_ComputerSystem).Domain) -Type String
24 |
25 | $0]]>
26 |
27 | registry
28 |
29 | source.powershell
30 |
31 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Require Snapin.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | reqs
6 |
7 | source.powershell
8 |
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Require Version.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | reqv
7 |
8 | source.powershell
9 |
10 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Require.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | req
6 |
7 | source.powershell
8 |
9 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Resolve_Path.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 | resolvepath
11 |
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Run_CSharp_Code.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | {1}",
76 | c.LocalEndPoint.ToString(),
77 | c.RemoteEndPoint.ToString());
78 | }
79 | }
80 | }
81 | }
82 | "@
83 |
84 | Add-Type -ReferencedAssemblies \$Assem -TypeDefinition \$Source -Language CSharp
85 |
86 | [PaulD.IPTools.TCPConnections]::ShowActiveTcpConnections()
87 |
88 | $0]]>
89 |
90 | csharp
91 |
92 | source.powershell
93 |
94 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/SecureString_Create_and_Reverse.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 | securestring
12 |
13 | source.powershell
14 |
15 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Send Email.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | "}
6 | Subject = ${3:"Notice of script failure"}
7 | Body = ${4:"The following script failed..."}
8 | SmtpServer = ${5:"smtp.domain.com"}
9 | Credential = ${6:"domain01\admin01"}
10 | }
11 |
12 | Send-MailMessage @emailParameter
13 | $0]]>
14 |
15 | Send-Email
16 |
17 | source.powershell
18 |
19 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Send Keyboard Input.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 | sendkey
14 |
15 | source.powershell
16 |
17 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/ShouldProcess.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 | shouldprocess
14 | source.powershell
15 |
16 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Splat_Params.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 | splatparams
14 |
15 | source.powershell
16 |
17 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Split File Path.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | splitpath
9 | source.powershell
10 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Split String On Character.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | split
9 | source.powershell
10 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Switch.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | switch
21 |
22 | source.powershell
23 |
24 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/Test Connection.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 | testconn
13 | source.powershell
14 |
15 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/WinRM_Config.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 | # Configure Service Authentication
22 | Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value \$false # Configured by default
23 | Set-Item -Path WSMan:\localhost\Service\Auth\Digest -Value \$true # Configured by default
24 | Set-Item -Path WSMan:\localhost\Service\Auth\Kerberos -Value \$true # Configured by default
25 | Set-Item -Path WSMan:\localhost\Service\Auth\Negotiate -Value \$true # Configured by default
26 | Set-Item -Path WSMan:\localhost\Service\Auth\Certificate -Value \$true # Configured by default
27 | Set-Item -Path WSMan:\localhost\Service\Auth\CredSSP -Value \$false # Configured by default
28 |
29 |
30 | # Configure Client
31 | Set-Item -Path WSMan:\localhost\Client\Auth\Basic -Value \$false # Configured by default
32 | Set-Item -Path WSMan:\localhost\Client\Auth\Digest -Value \$true # Configured by default
33 | Set-Item -Path WSMan:\localhost\Client\Auth\Kerberos -Value \$true # Configured by default
34 | Set-Item -Path WSMan:\localhost\Client\Auth\Negotiate -Value \$true # Configured by default
35 | Set-Item -Path WSMan:\localhost\Client\Auth\Certificate -Value \$true # Configured by default
36 | Set-Item -Path WSMan:\localhost\Client\Auth\CredSSP -Value \$false # Configured by default
37 | #>
38 |
39 | # Configure Shell
40 | <#
41 | Set-Item -Path WSMan:\localhost\Shell\AllowRemoteShellAccess -Value \$true # Configured by default
42 | Set-Item -Path WSMan:\localhost\Shell\IdleTimeout -Value 7200000 # Configured by default
43 | Set-Item -Path WSMan:\localhost\Shell\MaxConcurrentUsers -Value 2147483647 # Configured by default
44 | Set-Item -Path WSMan:\localhost\Shell\MaxShellRunTime -Value 2147483647 # Configured by default
45 | Set-Item -Path WSMan:\localhost\Shell\MaxProcessesPerShell -Value 2147483647 # Configured by default
46 | Set-Item -Path WSMan:\localhost\Shell\MaxMemoryPerShellMB -Value 2147483647 # Configured by default
47 | Set-Item -Path WSMan:\localhost\Shell\MaxShellsPerUser -Value 2147483647 # Configured by default
48 | #>
49 |
50 | # Configure Trusted Hosts
51 | if (Get-Elevation) {
52 | \$CurrentTrustedHosts = \$(ls WSMan:\localhost\Client\TrustedHosts).Value
53 | \$UpdatedTrustedHostsArrayPrep = \$CurrentTrustedHosts -split ", "
54 | [System.Collections.ArrayList]\$UpdatedTrustedHostsArray = \$UpdatedTrustedHostsArrayPrep
55 | \$NeededUpdates = @()
56 | foreach (\$obj1 in \$RemoteHostNetworkInfoArray) {
57 | if (\$UpdatedTrustedHostsArrayPrep -notcontains \$obj1) {
58 | \$UpdatedTrustedHostsArray.Add("\$obj1")
59 | \$NeededUpdates += \$obj1
60 | }
61 | }
62 | if (\$NeededUpdates.Count -gt 0) {
63 | \$UpdatedTrustedHostsArray = \$UpdatedTrustedHostsArray | % {if (\$_ -match "[\w]") {\$_}}
64 | \$UpdatedTrustedHostsArrayString = \$UpdatedTrustedHostsArray -join ", "
65 | Set-Item WSMan:\localhost\Client\TrustedHosts \$UpdatedTrustedHostsArrayString
66 | Remove-Variable -Name NeededUpdates -Force
67 | }
68 | else {
69 | Write-Host "The current winrm config already trusts \$RemoteHost. Continuing..."
70 | }
71 | }
72 |
73 | # Create New WinRM Listener
74 | New-Item -Path WSMan:\localhost\Listener -Address "*" -Transport "HTTP" -Port "5985" -Enabled \$true -URLPrefix "wsman"
75 |
76 | $0]]>
77 |
78 | winrmconfig
79 |
80 | source.powershell
81 |
82 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/WinSCP.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
17 |
18 | winscp
19 |
20 | source.powershell
21 |
22 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/try-catch-finally.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
22 |
23 | try
24 | {
25 | 1/0
26 | #Test-Connection bleh
27 | }
28 | catch [DivideByZeroException]
29 | {
30 | Write-Host "Divide by zero exception"
31 | }
32 | catch [System.Net.NetworkInformation.PingException]
33 | {
34 | Write-Host "Ping exception"
35 | }
36 | catch
37 | {
38 | Write-Host "General catch"
39 | Write-Verbose "Error creating \$Name on \$Computer`:\$($Error[0].Exception.Message)"
40 | }
41 | finally
42 | {
43 | Write-Host "cleaning up ..."
44 | }
45 | $0]]>
46 |
47 | trycatchfinally
48 |
49 | source.powershell
50 |
51 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/try-catch.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 | trycatch
12 | source.powershell
13 |
14 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/try-finally.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 | tryfinally
14 | source.powershell
15 |
16 |
--------------------------------------------------------------------------------
/IDE/SublimeSnippets/while.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | while
10 | source.powershell
11 |
12 |
--------------------------------------------------------------------------------
/MyFunctions/DueForRefactor/Convert-Frombase64.ps1:
--------------------------------------------------------------------------------
1 | function Convert-FromBase64 {
2 | [CmdletBinding()]
3 | Param(
4 | [Parameter(Mandatory=$True)]
5 | [string]$InputString
6 | )
7 |
8 | ##### BEGIN Main Body #####
9 | try {
10 | $Output = [System.Text.Encoding]::UNICODE.GetString([System.Convert]::FromBase64String($InputString))
11 | }
12 | catch {
13 | Write-Verbose "`$InputString is NOT a valid base64 string!"
14 | }
15 | if (!$Output) {
16 | Write-Error "`$InputString is NOT a valid base64 string! Halting!"
17 | $global:FunctionResult = "1"
18 | return
19 | }
20 | if ($Output) {
21 | return $Output
22 | }
23 | ##### END Main Body #####
24 |
25 | }
26 |
27 |
28 | # SIG # Begin signature block
29 | # MIIMLAYJKoZIhvcNAQcCoIIMHTCCDBkCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
30 | # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
31 | # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUNcxITuGMHoMAJ9Av6OwdlseZ
32 | # qN+gggmhMIID/jCCAuagAwIBAgITawAAAAQpgJFit9ZYVQAAAAAABDANBgkqhkiG
33 | # 9w0BAQsFADAwMQwwCgYDVQQGEwNMQUIxDTALBgNVBAoTBFpFUk8xETAPBgNVBAMT
34 | # CFplcm9EQzAxMB4XDTE1MDkwOTA5NTAyNFoXDTE3MDkwOTEwMDAyNFowPTETMBEG
35 | # CgmSJomT8ixkARkWA0xBQjEUMBIGCgmSJomT8ixkARkWBFpFUk8xEDAOBgNVBAMT
36 | # B1plcm9TQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCmRIzy6nwK
37 | # uqvhoz297kYdDXs2Wom5QCxzN9KiqAW0VaVTo1eW1ZbwZo13Qxe+6qsIJV2uUuu/
38 | # 3jNG1YRGrZSHuwheau17K9C/RZsuzKu93O02d7zv2mfBfGMJaJx8EM4EQ8rfn9E+
39 | # yzLsh65bWmLlbH5OVA0943qNAAJKwrgY9cpfDhOWiYLirAnMgzhQd3+DGl7X79aJ
40 | # h7GdVJQ/qEZ6j0/9bTc7ubvLMcJhJCnBZaFyXmoGfoOO6HW1GcuEUwIq67hT1rI3
41 | # oPx6GtFfhCqyevYtFJ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MCMGCSqGSIb3DQEJBDEWBBQ07ET7fRnb
88 | # UuVqEHtdFnpPdQl4nTANBgkqhkiG9w0BAQEFAASCAQBe1mWEVXDuA1nsk+LinWb5
89 | # 29zKyn3GBUH+vZItx1I0ZnW0tF/AxUTqMuiUAXxq20rHm7wjPxjuoH6OJnqd0rbk
90 | # Bd5HzyBtdBqDM18vMJ184hfsImDxDUjaagTIWTzfV1Yo93Woi8glWLx3/d7W9izr
91 | # n2Fp8LqYNAPQf6I0rqrGcHyv8o+fmTyOY+Kl7OW8yhKUNdeTBcrcVqwRkPHFEIaB
92 | # q9f4OqqmE+HUrJrftqFowbWn6Z5ENktEuDQpO992XtKohGtn7BcpWNB/VlX8JyDR
93 | # y9PAfuXH2d8eJBZGNttxeM7yW5f4UWm5zf5CRKKFR4z7dJ9aJjJlcy8UP5Bd2JyR
94 | # SIG # End signature block
95 |
--------------------------------------------------------------------------------
/MyFunctions/Enable-RemoteDesktop.ps1:
--------------------------------------------------------------------------------
1 | function Enable-RemoteDesktop {
2 | [CmdletBinding()]
3 | param()
4 |
5 | Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\' -Name 'fDenyTSConnections' -Value 0
6 | Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\' -Name 'UserAuthentication' -Value 1
7 | Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
8 | }
9 | # SIG # Begin signature block
10 | # MIIMiAYJKoZIhvcNAQcCoIIMeTCCDHUCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
11 | # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
12 | # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUL3eO5m+2PS/oL7azzkkLT17Y
13 | # VEagggn9MIIEJjCCAw6gAwIBAgITawAAAB/Nnq77QGja+wAAAAAAHzANBgkqhkiG
14 | # 9w0B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v9r/hf9rBs8pXhLc+ujkdNGP6B
76 | # 4OG5qxDKO2sY8Bcw93/GM8JpeYuAAGlH1Da5IfO5dPovJ1UJ0FkXeYoVsVQ=
77 | # SIG # End signature block
78 |
--------------------------------------------------------------------------------
/MyFunctions/New-SubCACertReq.ps1:
--------------------------------------------------------------------------------
1 | # IMPORTANT NOTE: Run this from the Subordinate CA Server hosting the ADCS Website
2 | $CertGenWorkingDir = "$HOME\Downloads\CertGenWorking"
3 | if (!$(Test-Path $CertGenWorkingDir)) {
4 | New-Item -ItemType Directory -Name CertGenWorking -Path $($CertGenWorkingDir | Split-Path -Parent)
5 | }
6 | $RootCALoc = "ZeroDC01.zero.lab\ZeroDC01"
7 | $SubCALoc = "ZeroSCA.zero.lab\ZeroSCA"
8 | $infFile = "$CertGenWorkingDir\NewSubCAReq_Config_ZeroSCA.ZERO.LAB.inf"
9 | $requestFile = "$CertGenWorkingDir\NewSubCAReq_ZeroSCA.ZERO.LAB.csr"
10 | $CertFileOut = "$CertGenWorkingDir\ZeroSCA.ZERO.LAB_base64.cer"
11 | $CertificateChain = "$CertGenWorkingDir\ZeroSCA.ZERO.LAB.p7b"
12 |
13 | $inf = @"
14 | [Version]
15 | Signature="`$Windows NT`$"
16 |
17 | [NewRequest]
18 | Subject = "CN=ZeroSCA.zero.lab"
19 | KeySpec = 1
20 | KeyLength = 2048
21 | Exportable = TRUE
22 | FriendlyName = "ZeroSCA"
23 | MachineKeySet = TRUE
24 | SMIME = FALSE
25 | PrivateKeyArchive = FALSE
26 | UserProtected = FALSE
27 | UseExistingKeySet = FALSE
28 | ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
29 | ProviderType = 12
30 | RequestType = PKCS10
31 | KeyUsage = "CERT_KEY_CERT_SIGN_KEY_USAGE | CERT_DIGITAL_SIGNATURE_KEY_USAGE | CERT_CRL_SIGN_KEY_USAGE"
32 | KeyUsageProperty = "NCRYPT_ALLOW_SIGNING_FLAG"
33 |
34 | [RequestAttributes]
35 | CertificateTemplate = "SubCA"
36 |
37 | [BasicConstraintsExtension]
38 | Critical = Yes
39 | "@
40 |
41 | $inf | Out-File $infFile
42 | certreq.exe -new "$infFile" "$requestFile"
43 | Sleep -Seconds 5
44 | $RequestID = (certreq.exe -config "$RootCALoc" -submit "$requestFile" "$CertFileOut").split('"')[2]
45 | Sleep -Seconds 5
46 | certreq.exe -retrieve -config $RootCALoc $RequestID $CertificateChain
47 | Sleep -Seconds 5
48 | certutil -config $SubCALoc -installCert $CertificateChain
49 |
50 | Write-Host @"
51 | # IMPORTANT NOTE: You will most likely need an updated .crl from your RootCA and/or your SubCA.
52 | # On the RootCA and/or the SubCA, use...
53 | # certutil -crl
54 | # ...which will publish a new .crl to C:\Windows\System32\CertSrv\CertEnroll. Copy the .crl file(s)
55 | # the the following locations on your SubCA:
56 | # C:\Windows\System32\CertSrv\CertEnroll
57 | # C:\inetpub\wwwroot\certdata (if your Subordinate CA is running ADCS Website)
58 | "@
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/Cache-SudoPwd.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .SYNOPSIS
3 | Cache your sudo password in PSSession with remote Linux machine so you can easily run sudo commands
4 |
5 | .DESCRIPTION
6 | See SYNOPSIS
7 |
8 | .PARAMETER SudoPass
9 | REQUIRED. Takes a [securestring] of your sudo password
10 |
11 | .PARAMETER PSSession
12 | OPTIONAL. Takes an existing [System.Management.Automation.Runspaces.PSSession] (create via New-PSSession)
13 |
14 | .EXAMPLE
15 | # Example Usage for PSSession with Remote Host #
16 | Cache-SudoPwd -PSSession $PSSession -SudoPass $(Read-Host 'Enter sudo password' -AsSecureString)
17 | Invoke-Command $PSSession {sudo whoami}
18 |
19 | .EXAMPLE
20 | # Example usage *within* a PSSession #
21 | # Load the function in the existing PSSession
22 | $FunctionsForRemoteUse = @(
23 | ${Function:Cache-SudoPwd}.Ast.Extent.Text
24 | )
25 | Invoke-Command -Session $PSSession -ScriptBlock {$using:FunctionsForRemoteUse | foreach {Invoke-Expression $_}}
26 | # Enter the PSSession
27 | Enter-PSSession $PSSession
28 | Cache-SudoPwd -SudoPass $(Read-Host 'Enter sudo password' -AsSecureString)
29 | # Now you can run sudo commands interactively in the PSSession
30 | sudo whoami
31 | #>
32 | function Cache-SudoPwd {
33 | [CmdletBinding()]
34 | Param(
35 | [Parameter(Mandatory=$True)]
36 | [securestring]$SudoPass,
37 |
38 | [Parameter(Mandatory=$False)]
39 | [System.Management.Automation.Runspaces.PSSession]$PSSession
40 | )
41 |
42 | if ($PSSession) {
43 | if ($PSVersionTable.PSVersion -ge [version]'7.1') {
44 | Invoke-Command $PSSession -ScriptBlock {
45 | param([securestring]$SudoPassSS)
46 | $null = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SudoPassSS))) | sudo -S whoami 2>&1
47 | if ($LastExitCode -ne 0) {Write-Error -Message "Failed to cache sudo password"; return}
48 | } -ArgumentList @($SudoPass)
49 | } else {
50 | Invoke-Command $PSSession -ScriptBlock {
51 | param([String]$SudoPassPT)
52 | $null = $SudoPassPT | sudo -S whoami 2>&1
53 | if ($LastExitCode -ne 0) {Write-Error -Message "Failed to cache sudo password"; return}
54 | } -ArgumentList @([Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($SudoPass)))
55 | }
56 | } else {
57 | if (!$PSSenderInfo) {
58 | Write-Error -Message "You must be running this function from within a PSSession or provide a PSSession object via the -PSSession parameter! Halting!"
59 | return
60 | }
61 | $null = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SudoPass))) | sudo -S whoami 2>&1
62 | if ($LastExitCode -ne 0) {Write-Error -Message "Failed to cache sudo password"; return}
63 | }
64 | }
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/Get-Elevation.ps1:
--------------------------------------------------------------------------------
1 | function Get-Elevation {
2 | if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.Platform -eq "Win32NT" -or $PSVersionTable.PSVersion.Major -le 5) {
3 | [System.Security.Principal.WindowsPrincipal]$currentPrincipal = New-Object System.Security.Principal.WindowsPrincipal(
4 | [System.Security.Principal.WindowsIdentity]::GetCurrent()
5 | )
6 |
7 | [System.Security.Principal.WindowsBuiltInRole]$administratorsRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
8 |
9 | if($currentPrincipal.IsInRole($administratorsRole)) {
10 | return $true
11 | }
12 | else {
13 | return $false
14 | }
15 | }
16 |
17 | if ($PSVersionTable.Platform -eq "Unix") {
18 | if ($(whoami) -eq "root") {
19 | return $true
20 | }
21 | else {
22 | return $false
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/Get-NetIPAddressForLinux.ps1:
--------------------------------------------------------------------------------
1 | function Get-NetIPAddressForLinux {
2 | [CmdletBinding()]
3 | $source = @"
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Management.Automation;
7 | using System.Net;
8 | using System.Net.NetworkInformation;
9 |
10 | public class NetworkInfo
11 | {
12 | public class InterfaceInfo
13 | {
14 | public string Interface { get; set; }
15 | public string InterfaceAlias { get; set; }
16 | public string Status { get; set; }
17 | public string IPv4Address { get; set; }
18 | public string IPv4SubnetMask { get; set; }
19 | public string IPv6Address { get; set; }
20 | public int IPv6PrefixLength { get; set; }
21 | }
22 |
23 | public static InterfaceInfo[] GetNetworkInformation()
24 | {
25 | List result = new List();
26 |
27 | // Get all network interfaces on the system
28 | NetworkInterface[] networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
29 |
30 | foreach (NetworkInterface netInterface in networkInterfaces)
31 | {
32 | InterfaceInfo info = new InterfaceInfo();
33 | info.Interface = netInterface.Name;
34 | info.InterfaceAlias = netInterface.Description;
35 | info.Status = netInterface.OperationalStatus.ToString();
36 |
37 | // Get IP properties for each interface
38 | IPInterfaceProperties ipProperties = netInterface.GetIPProperties();
39 |
40 | // Get Unicast IP Addresses (IPv4 and IPv6)
41 | foreach (UnicastIPAddressInformation ip in ipProperties.UnicastAddresses)
42 | {
43 | if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) // IPv4
44 | {
45 | info.IPv4Address = ip.Address.ToString();
46 | info.IPv4SubnetMask = ip.IPv4Mask.ToString();
47 | }
48 | else if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6) // IPv6
49 | {
50 | info.IPv6Address = ip.Address.ToString();
51 | info.IPv6PrefixLength = ip.PrefixLength;
52 | }
53 | }
54 |
55 | result.Add(info);
56 | }
57 |
58 | return result.ToArray();
59 | }
60 | }
61 | "@
62 |
63 | # Compile the C# code and load the assembly using Add-Type
64 | try {Add-Type -TypeDefinition $source} catch { Write-Host $_.Exception.Message }
65 |
66 | # Output the result of the GetNetworkInformation method
67 | [NetworkInfo]::GetNetworkInformation()
68 | }
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/Process-ICM.ps1:
--------------------------------------------------------------------------------
1 | function Process-ICM {
2 | [CmdletBinding()]
3 | Param(
4 | [Parameter(Mandatory=$True)]
5 | [System.Management.Automation.Runspaces.PSSession]$PSSession,
6 |
7 | [Parameter(Mandatory=$True)]
8 | [string]$Command,
9 |
10 | [Parameter(Mandatory=$False)]
11 | [ValidateSet('String','Other')]
12 | [string]$OutputType = 'Other'
13 | )
14 |
15 | if ($OutputType -eq 'String') {
16 | # Validate [string]$Command has a line in it that indicates $OutputThatICareAbout is below here...
17 | $OutputIndicatorLine = ($Command -split "`n") -match 'SuccessOutput'
18 | if (!$OutputIndicatorLine) {
19 | Write-Error "The Command you provided does not have a line with the string 'SuccessOutput' (including single quotes)`
20 | that indicates where the output you care about is. Halting!"
21 | return
22 | }
23 |
24 | Invoke-Command -Session $PSSession {Invoke-Expression -Command $using:Command} -ErrorVariable icmErrs 2>&1 | Tee-Object -Variable icmAllOutput *>$null
25 |
26 | $ErrsThatICareAbout = $icmErrs.Exception.Message -notmatch '^NotSpecified'
27 | #if ($ErrsThatICareAbout.Count -gt 0) {$ErrsThatICareAbout | foreach {Write-Error $_}}
28 | $OutputThatICareAbout = $icmAllOutput[($icmAllOutput.IndexOf('SuccessOutput') + 1)..$icmAllOutput.Count]
29 | #if ($OutputThatICareAbout.Count -gt 0) {$OutputThatICareAbout | foreach {$_}}
30 |
31 | [pscustomobject]@{
32 | Errors = $icmErrs
33 | Output = $icmAllOutput
34 | RealErrors = $ErrsThatICareAbout
35 | RealOutput = $OutputThatICareAbout
36 | }
37 |
38 | Write-Host '$_.RealOutput is [string[]]'
39 | } else {
40 | Invoke-Command -Session $PSSession {Invoke-Expression -Command $using:Command} -ErrorVariable icmErrs 2>&1 | Tee-Object -Variable icmAllOutput *>$null
41 |
42 | $ErrsThatICareAbout = $icmErrs.Exception.Message -notmatch '^NotSpecified'
43 | #if ($ErrsThatICareAbout.Count -gt 0) {$ErrsThatICareAbout | foreach {Write-Error $_}}
44 | $OutputThatICareAbout = @($icmAllOutput) | Where-Object {$_ -isnot [System.Management.Automation.ErrorRecord]}
45 | #if ($OutputThatICareAbout.Count -gt 0) {$OutputThatICareAbout | foreach {$_}}
46 | if ($OutputThatICareAbout -match 'SuccessOutput') {
47 | $LineContent = $OutputThatICareAbout | Where-Object {$_ -match 'SuccessOutput'}
48 | $OutputThatICareAbout = $OutputThatICareAbout[($OutputThatICareAbout.IndexOf($LineContent) + 1)..$OutputThatICareAbout.Count]
49 | }
50 |
51 | [pscustomobject]@{
52 | Errors = $icmErrs
53 | Output = $icmAllOutput
54 | RealErrors = $ErrsThatICareAbout
55 | RealOutput = $OutputThatICareAbout
56 | }
57 |
58 | if ($OutputThatICareAbout.Count -gt 0) {
59 | $objectTypes = $OutputThatICareAbout | foreach {$_.GetType().FullName}
60 | Write-Host "`$_.RealOutput.Count is $($OutputThatICareAbout.Count) and it contains these types of objects (in order): $($objectTypes -join ', ')`n"
61 | } elseif (!$icmAllOutput) {
62 | Write-Host "You received *no* output at all...including no errors. This might be okay."
63 | } else {
64 | Write-Host "You received *no* relevant output. Check the contents of `$_.RealErrors and `$_.Output to see what happened."
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/SudoExperiment/AddMySudoPwd.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .SYNOPSIS
3 | Edits /etc/sudoers to remove configuration that allows the current user to run 'sudo pwsh' without needing to enter a sudo password.
4 |
5 | .DESCRIPTION
6 | See SYNOPSIS
7 |
8 | .EXAMPLE
9 | # Launch pwsh and...
10 |
11 | AddMySudoPwd
12 |
13 | #>
14 | function AddMySudoPwd {
15 | [CmdletBinding()]
16 | Param()
17 |
18 | #region >> Prep
19 |
20 | if ($PSVersionTable.Platform -ne "Unix") {
21 | Write-Error "This function is meant for use on Linux! Halting!"
22 | $global:FunctionResult = "1"
23 | return
24 | }
25 |
26 | # 'Get-SudoStatus' cannnot be run as root...
27 | if (GetElevation) {
28 | $GetElevationAsString = ${Function:GetElevation}.Ast.Extent.Text
29 | $GetMySudoStatusAsString = ${Function:GetMySudoStatus}.Ast.Extent.Text
30 | $FinalScript = $GetElevationAsString + "`n" + $GetMySudoStatusAsString + "`n" + "GetMySudoStatus"
31 | $PwshScriptBytes = [System.Text.Encoding]::Unicode.GetBytes($FinalScript)
32 | $EncodedCommand = [Convert]::ToBase64String($PwshScriptBytes)
33 | $GetSudoStatusResult = su $env:SUDO_USER -c "pwsh -EncodedCommand $EncodedCommand" | ConvertFrom-Json
34 | }
35 | else {
36 | $GetSudoStatusResult = GetMySudoStatus | ConvertFrom-Json
37 | }
38 |
39 | if (!$GetSudoStatusResult.HasSudoPrivileges) {
40 | Write-Error "The user does not appear to have sudo privileges on $env:HOSTNAME! Halting!"
41 | $global:FunctionResult = "1"
42 | return
43 | }
44 |
45 | if ($GetSudoStatusResult.PasswordPrompt) {
46 | Write-Host "The account '$(whoami)' is already configured to prompt for a sudo password! No changes made." -ForegroundColor Green
47 | return
48 | }
49 |
50 | $DomainName = $GetSudoStatusResult.DomainInfo.DomainName
51 | $DomainNameShort = $GetSudoStatusResult.DomainInfo.DomainNameShort
52 | $UserNameShort = $GetSudoStatusResult.DomainInfo.UserNameShort
53 |
54 | #endregion >> Prep
55 |
56 | #region >> Main
57 |
58 | $PwshLocation = $(Get-Command pwsh).Source
59 | $SudoConfPath = "/etc/sudoers.d/pwsh-nosudo.conf"
60 | if ($DomainNameShort) {
61 | $RegexDefinition = "`$UserStringRegex = [regex]::Escape(`"%$DomainNameShort\\$UserNameShort ALL=(ALL) NOPASSWD: SUDO_PWSH`")"
62 | } else {
63 | $RegexDefinition = "`$UserStringRegex = [regex]::Escape(`"$UserNameShort ALL=(ALL) NOPASSWD: SUDO_PWSH`")"
64 | }
65 | $EditSudoersdFilePrep = @(
66 | $RegexDefinition
67 | 'try {'
68 | " `$SudoConfPath = '$SudoConfPath'"
69 | ' if (!$(Test-Path $SudoConfPath)) {'
70 | ' "sudoConfNotFound"'
71 | ' return'
72 | ' }'
73 | ' [System.Collections.ArrayList][array]$PwshSudoConfContent = @(Get-Content $SudoConfPath)'
74 | ' if ($PwshSudoConfContent.Count -gt 0) {'
75 | ' $MatchingLine = $PwshSudoConfContent -match $UserStringRegex'
76 | ' if ($MatchingLine) {'
77 | ' $null = $PwshSudoConfContent.Remove($MatchingLine)'
78 | ' Set-Content -Path $SudoConfPath -Force -Value $PwshSudoConfContent'
79 | ' "Success"'
80 | ' }'
81 | ' else {'
82 | ' "NoChanges"'
83 | ' }'
84 | ' }'
85 | ' else {'
86 | ' "NoChanges"'
87 | ' }'
88 | '}'
89 | 'catch {'
90 | ' Write-Error $_'
91 | ' $global:FunctionResult = "1"'
92 | ' return'
93 | '}'
94 | )
95 | $EditSudoersdFile = $EditSudoersdFilePrep -join "`n"
96 |
97 | $Bytes = [System.Text.Encoding]::Unicode.GetBytes($EditSudoersdFile)
98 | $EncodedCommand = [Convert]::ToBase64String($Bytes)
99 | $Result = sudo pwsh -EncodedCommand $EncodedCommand
100 |
101 | if (!$Result) {
102 | Write-Error "There was an issue checking/updating writing '/etc/sudoers.d/pwsh-nosudo.conf'! Please review. Halting!"
103 | $global:FunctionResult = "1"
104 | return
105 | }
106 |
107 | $Result
108 |
109 | <#
110 | # cat /etc/sudoers | grep -Eic 'Cmnd_Alias SUDO_PWSH = /bin/pwsh' > /dev/null && echo present || echo absent
111 | [System.Collections.Generic.List[PSObject]]$UpdateSudoersScriptPrep = @()
112 | if ($DomainNameShort) {
113 | $RemoveUserString = "cat /etc/sudoers | grep -Eic '\%$DomainNameShort..$UserNameShort ALL=\(ALL\) NOPASSWD: SUDO_PWSH' > " +
114 | "/dev/null && sed -i '/$DomainNameShort..$UserNameShort ALL.*SUDO_PWSH/d' /etc/sudoers || echo 'NotFound'"
115 | }
116 | else {
117 | $RemoveUserString = "cat /etc/sudoers | grep -Eic '$UserNameShort ALL=\(ALL\) NOPASSWD: SUDO_PWSH' > " +
118 | "/dev/null && sed -i '/$UserNameShort ALL.*SUDO_PWSH/d' /etc/sudoers || echo 'NotFound'"
119 | }
120 | $UpdateSudoersScriptPrep.Add($RemoveUserString)
121 | $UpdateSudoersScript = $UpdateSudoersScriptPrep -join '; '
122 |
123 | $null = sudo bash -c "$UpdateSudoersScript"
124 |
125 | if ($LASTEXITCODE -ne 0) {
126 | Write-Error "There was an issue updating /etc/sudoers! Please review. Halting!"
127 | $global:FunctionResult = "1"
128 | return
129 | }
130 |
131 | "Success"
132 | #>
133 |
134 | #endregion >> Main
135 | }
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/SudoExperiment/GetLinuxOctalPermissions.ps1:
--------------------------------------------------------------------------------
1 | function GetLinuxOctalPermissions {
2 | [CmdletBinding()]
3 | Param(
4 | [Parameter(Mandatory=$True)]
5 | [string]$FullPath,
6 |
7 | [Parameter(Mandatory=$False)]
8 | [switch]$Children
9 | )
10 |
11 | # If $FullPath ends with '/', remove it
12 | if ($FullPath[-1] -eq "/") {
13 | $FullPath = $FullPath.Substring(0,$VaultSSHHostSigningUrl.Length-1)
14 | }
15 |
16 | if (!$(Test-Path $FullPath)) {
17 | Write-Error "The path $FullPath was not found! Halting!"
18 | $global:FunctionResult = "1"
19 | return
20 | }
21 |
22 | $FinalFullPath = if (!$Children) {$FullPath -replace "[\s]","\ "} else {$($FullPath -replace "[\s]","\ ") + '/*'}
23 | $ResultPrep = [scriptblock]::Create($('stat -c "%a %n" {0}' -f $FinalFullPath)).InvokeReturnAsIs()
24 |
25 | if (!$ResultPrep) {
26 | Write-Error $Error[0]
27 | $global:FunctionResult = "1"
28 | return
29 | }
30 |
31 | $Result = $ResultPrep | foreach {
32 | $Octal = $($_ -split "[\s]")[0]
33 | $ItemPath = $($_ -split "[\s]")[-1]
34 | [pscustomobject]@{
35 | ItemInfo = Get-Item $ItemPath
36 | Permissions = $Octal
37 | }
38 | }
39 |
40 | $Result
41 | }
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/SudoExperiment/GetMySudoStatus.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .SYNOPSIS
3 | Determines if the specified user has sudo privileges on a Remote Host, and if so, whether or not they are prompted for a
4 | sudo password when running 'sudo pwsh'.
5 |
6 | Returns a pscustomobject with bool properties 'HasSudoPrivileges' and 'PasswordPrompt'.
7 |
8 | .DESCRIPTION
9 | See SYNOPSIS
10 |
11 | .EXAMPLE
12 | # Launch pwsh and...
13 |
14 | GetMySudoStatus
15 |
16 | #>
17 | function GetMySudoStatus {
18 | [CmdletBinding()]
19 | Param()
20 |
21 | #region >> Prep
22 |
23 | if (GetElevation) {
24 | Write-Error "The Get-MySudoStatus function cannot be run as root! Halting!"
25 | $global:FunctionResult = "1"
26 | return
27 | }
28 |
29 | # On Linux, under a Domain Account, 'whoami' returns something like: zeroadmin@zero.lab
30 | # On Linux, under a Local Account, 'whoami' returns something like: vagrant
31 | # On Windows under a Domain Account, 'whoami' returns something like: zero\zeroadmin
32 | # On Windows under a Local Account, 'whoami' returns something like: pdadmin
33 | $UserName = whoami
34 | if (!$PSVersionTable.Platform -or $PSVersionTable.Platform -eq "Win32NT") {
35 | if ($UserName -match '\\') {
36 | $DomainNameShort = $($UserName -split '\\')[0]
37 | $UserNameShort = $($UserName -split '\\')[-1]
38 | }
39 | else {
40 | $UserNameShort = $UserName
41 | }
42 | }
43 | elseif ($PSVersionTable.Platform -eq "Unix" -or $PSVersionTable.OS -match "Darwin") {
44 | if ($UserName -match '@') {
45 | $DomainName = $($UserName -split "@")[-1]
46 | $DomainNameShort = $($DomainName -split '\.')[0]
47 | $UserNameShort = $($UserName -split "@")[0]
48 | }
49 | else {
50 | $UserNameShort = $UserName
51 | }
52 | }
53 |
54 | #endregion >> Prep
55 |
56 | #region >> Main
57 |
58 | $PSVerTablePwshBytes = [System.Text.Encoding]::Unicode.GetBytes('$PSVersionTable')
59 | $EncodedCommand = [Convert]::ToBase64String($PSVerTablePwshBytes)
60 |
61 | [System.Collections.ArrayList]$CheckSudoStatusScriptPrep = @(
62 | $('prompt=$(sudo -n pwsh -EncodedCommand {0} 2>&1)' -f $EncodedCommand)
63 | $('if [ $? -eq 0 ]; then echo {0}; elif echo $prompt | grep -q {1}; then echo {2}; else echo {3}; fi' -f "'NoPasswordPrompt'","'^sudo'","'PasswordPrompt'","'NoSudoPrivileges'")
64 | )
65 | $CheckSudoStatusScript = $CheckSudoStatusScriptPrep -join '; '
66 | $Output = bash -c "$CheckSudoStatusScript"
67 |
68 | if ($Output -match 'NoPasswordPrompt') {
69 | $FinalOutput = [pscustomobject]@{
70 | HasSudoPrivileges = $True
71 | PasswordPrompt = $False
72 | IsDomainAccount = if ($DomainName -or $DomainNameShort) {$True} else {$False}
73 | DomainInfo = [pscustomobject]@{
74 | DomainName = $DomainName
75 | DomainNameShort = $DomainNameShort
76 | UserNameShort = $UserNameShort
77 | }
78 | BashOutput = $Output
79 | }
80 | }
81 | elseif ($Output -match 'PasswordPrompt') {
82 | $FinalOutput = [pscustomobject]@{
83 | HasSudoPrivileges = $True
84 | PasswordPrompt = $True
85 | IsDomainAccount = if ($DomainName -or $DomainNameShort) {$True} else {$False}
86 | DomainInfo = [pscustomobject]@{
87 | DomainName = $DomainName
88 | DomainNameShort = $DomainNameShort
89 | UserNameShort = $UserNameShort
90 | }
91 | BashOutput = $Output
92 | }
93 | }
94 | elseif ($Output -match 'NoSudoPrivileges') {
95 | $FinalOutput = [pscustomobject]@{
96 | HasSudoPrivileges = $False
97 | PasswordPrompt = $False
98 | IsDomainAccount = if ($DomainName -or $DomainNameShort) {$True} else {$False}
99 | DomainInfo = [pscustomobject]@{
100 | DomainName = $DomainName
101 | DomainNameShort = $DomainNameShort
102 | UserNameShort = $UserNameShort
103 | }
104 | BashOutput = $Output
105 | }
106 | }
107 |
108 | $FinalOutput | ConvertTo-Json
109 |
110 | #endregion >> Main
111 | }
--------------------------------------------------------------------------------
/MyFunctions/PowerShellCore_Compatible/SudoExperiment/NewCronToAddSudoPwd.ps1:
--------------------------------------------------------------------------------
1 | function NewCronToAddSudoPwd {
2 | [CmdletBinding()]
3 | Param()
4 |
5 | #region >> Prep
6 |
7 | if ($PSVersionTable.Platform -ne "Unix") {
8 | Write-Error "This function is meant for use on Linux! Halting!"
9 | $global:FunctionResult = "1"
10 | return
11 | }
12 |
13 | # 'Get-SudoStatus' cannnot be run as root...
14 | if (GetElevation) {
15 | $GetElevationAsString = ${Function:GetElevation}.Ast.Extent.Text
16 | $GetMySudoStatusAsString = ${Function:GetMySudoStatus}.Ast.Extent.Text
17 | $FinalScript = $GetElevationAsString + "`n" + $GetMySudoStatusAsString + "`n" + "GetMySudoStatus"
18 | $PwshScriptBytes = [System.Text.Encoding]::Unicode.GetBytes($FinalScript)
19 | $EncodedCommand = [Convert]::ToBase64String($PwshScriptBytes)
20 | $GetSudoStatusResult = su $env:SUDO_USER -c "pwsh -EncodedCommand $EncodedCommand" | ConvertFrom-Json
21 | }
22 | else {
23 | $GetSudoStatusResult = GetMySudoStatus | ConvertFrom-Json
24 | }
25 |
26 | if (!$GetSudoStatusResult.HasSudoPrivileges) {
27 | Write-Error "The user does not appear to have sudo privileges on $env:HOSTNAME! Halting!"
28 | $global:FunctionResult = "1"
29 | return
30 | }
31 |
32 | if ($GetSudoStatusResult.PasswordPrompt) {
33 | Write-Host "The account '$(whoami)' is already configured to be prompted for a password when running 'sudo pwsh'! No changes made." -ForegroundColor Green
34 | return
35 | }
36 |
37 | $DomainName = $GetSudoStatusResult.DomainInfo.DomainName
38 | $DomainNameShort = $GetSudoStatusResult.DomainInfo.DomainNameShort
39 | $UserNameShort = $GetSudoStatusResult.DomainInfo.UserNameShort
40 |
41 | #endregion >> Prep
42 |
43 | #region >> Main
44 |
45 | if ($DomainNameShort) {
46 | $RemoveUserString = "grep -Eic '\%$DomainNameShort..$UserNameShort ALL=\(ALL\) NOPASSWD: SUDO_PWSH' > " +
47 | "/dev/null && sed -i '/$DomainNameShort..$UserNameShort ALL.*SUDO_PWSH/d' /etc/sudoers"
48 | }
49 | else {
50 | $RemoveUserString = "grep -Eic '$UserNameShort ALL=\(ALL\) NOPASSWD: SUDO_PWSH' > " +
51 | "/dev/null && sed -i '/$UserNameShort ALL.*SUDO_PWSH/d' /etc/sudoers"
52 | }
53 |
54 | $BashScriptPrep = @(
55 | 'set -f'
56 | "croncmd=\`"sleep 10; ps aux | grep -v grep | grep -Eic '$PID.*pwsh' && echo pwshStillRunning || cat /etc/sudoers.d/pwsh-nosudo.conf | $RemoveUserString && ( crontab -l | grep 'ps aux.*cat /etc/sudoers' ) | crontab -\`""
57 | 'cronjob=\"* * * * * $croncmd\"'
58 | "( crontab -l | grep 'ps aux.*cat /etc/sudoers'; echo \`"`$cronjob\`" ) | crontab -"
59 | )
60 | $BashScript = $BashScriptPrep -join '; '
61 |
62 | sudo bash -c "$BashScript"
63 |
64 | #endregion >> Main
65 | }
--------------------------------------------------------------------------------
/MyModules/EncryptDecrypt/EncryptDecrypt.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/EncryptDecrypt/EncryptDecrypt.psd1
--------------------------------------------------------------------------------
/MyModules/GitEnv/GitEnv.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/GitEnv/GitEnv.psd1
--------------------------------------------------------------------------------
/MyModules/HexOps/HexOps.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/HexOps/HexOps.psd1
--------------------------------------------------------------------------------
/MyModules/HexOps/HexOps.psm1:
--------------------------------------------------------------------------------
1 | function Convert-HexToDec {
2 | param($hex)
3 |
4 | ForEach ($value in $hex) {
5 | [Convert]::ToInt32($value,16)
6 | }
7 | }
8 |
9 | function Convert-DecToHex {
10 | param($dec)
11 |
12 | ForEach ($value in $dec) {
13 | "{0:x}" -f [Int]$value
14 | }
15 | }
16 |
17 |
18 | #>
19 | # SIG # Begin signature block
20 | # MIIMLAYJKoZIhvcNAQcCoIIMHTCCDBkCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
21 | # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
22 | # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUrn8TrkNwK5rz17NbgHgPuYe4
23 | # NsigggmhMIID/jCCAuagAwIBAgITawAAAAQpgJFit9ZYVQAAAAAABDANBgkqhkiG
24 | # 9w0BAQsFADAwMQwwCgYDVQQGEwNMQUIxDTALBgNVBAoTBFpFUk8xETAPBgNVBAMT
25 | # CFplcm9EQzAxMB4XDTE1MDkwOTA5NTAyNFoXDTE3MDkwOTEwMDAyNFowPTETMBEG
26 | # CgmSJomT8ixkARkWA0xBQjEUMBIGCgmSJomT8ixkARkWBFpFUk8xEDAOBgNVBAMT
27 | # B1plcm9TQ0Ewgg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IqC6oMGerNakhOCgrhU7m+cERPkTcADVH/PWhy+FJWd2px
74 | # ViKcyzWQSyX93PcOj2SsHvi7vEAfCGcxggH1MIIB8QIBATBUMD0xEzARBgoJkiaJ
75 | # k/IsZAEZFgNMQUIxFDASBgoJkiaJk/IsZAEZFgRaRVJPMRAwDgYDVQQDEwdaZXJv
76 | # U0NBAhNYAAAAPDajznxlIudFAAAAAAA8MAkGBSsOAwIaBQCgeDAYBgorBgEEAYI3
77 | # AgEMMQowCKACgAChAoAAMBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisG
78 | # AQQBgjcCAQsxDjAMBgorBgEEAYI3AgEVMCMGCSqGSIb3DQEJBDEWBBR1Vlr5TutT
79 | # CKS4mbKEvk1yiSUKCzANBgkqhkiG9w0BAQEFAASCAQAiHYFofE57FPvd73NoVYPj
80 | # v8IUGPa+rttDXG2V6wMsi9C937ggDQQQjn8A/gkcPw9V1yx0ZmpiDs+KpiOSjyLA
81 | # IIGEVZ/rS10j4wSMoykBZKfdKQmwLQIagjiRfCwzTq1pg2C+bGgiOs8wjr6+daqY
82 | # SDJI6V3Ht40IThV+5xs/aVti69T6s+MRtMQqpql+C0VtumUES9mwku6HhyNGnjLa
83 | # fDSR8wopEKrtrnYEFLcKN1l2z/BGh797OAB0DLm2GMkYM0bofeZNI2Q0BL54YQG9
84 | # pq8D+WP5Oh7guTUAl4qxvatqvBVOTm8xXx6MI4mixuvl3Ic7CDf57UhfCbUGaWcz
85 | # SIG # End signature block
86 |
--------------------------------------------------------------------------------
/MyModules/Network-SnifferTools/Network-SnifferTools.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/Network-SnifferTools/Network-SnifferTools.psd1
--------------------------------------------------------------------------------
/MyModules/Permutations/Permutations.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/Permutations/Permutations.psd1
--------------------------------------------------------------------------------
/MyModules/Start-PSLogging/Start-PSLogging.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/Start-PSLogging/Start-PSLogging.psd1
--------------------------------------------------------------------------------
/MyModules/Sudo/Sudo.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/Sudo/Sudo.psd1
--------------------------------------------------------------------------------
/MyModules/UserSessionEx/UserSessionEx.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/UserSessionEx/UserSessionEx.psd1
--------------------------------------------------------------------------------
/MyModules/UserSessionEx/en-US/about_UserSessionEx.help.txt:
--------------------------------------------------------------------------------
1 | This is a rudimentary PowerShell module for gathering all User Session information on one or more hosts.
2 |
3 | Frequently Asked Questions:
4 |
5 | TODO:
6 | Placeholder
7 |
8 | Dependencies:
9 |
10 | None
11 |
12 | References:
13 |
14 | TODO:
15 | Placeholder
16 |
17 |
18 |
--------------------------------------------------------------------------------
/MyModules/WinRM-Environment/WinRM-Environment.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/WinRM-Environment/WinRM-Environment.psd1
--------------------------------------------------------------------------------
/MyModules/WinSSH/WinSSH.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/MyModules/WinSSH/WinSSH.psd1
--------------------------------------------------------------------------------
/MyScripts/Add-NewMethodToAllObjects.ps1:
--------------------------------------------------------------------------------
1 | # Add New Method to ALL Objects in PowerShell
2 |
3 | # The below adds the method PSAddMember() to all objects in the PowerShell Session
4 | [system.object] | Update-TypeData -MemberType ScriptMethod -MemberName PSAddMember -Value {
5 | switch ($args.count) {
6 | 1 {
7 | $hash = $args[0] -as [HashTable]
8 | foreach ($key in $hash.keys) {
9 | Add-Member -InputObject $this -Name $key -value $hash.$key -MemberType NoteProperty -Force
10 | }
11 | }
12 |
13 | 2 {
14 | $name,$value = $args
15 | Add-Member -InputObject $this -Name $name -value $value -MemberType NoteProperty -Force
16 | }
17 |
18 | 3 {
19 | $name,$value,$MemberType = $args
20 | Add-Member -InputObject $this -Name $name -value $value -MemberType $MemberType -Force
21 | }
22 | }
23 | }
24 |
25 | # The below adds the method MSDN() to all objects in the PowerShell Session
26 | [system.object] | Update-TypeData -MemberType ScriptMethod -MemberName MSDN -Value {
27 | if (($global:MSDNViewer -eq $null) -or ($global:MSDNViewer.HWND -eq $null)) {
28 | $global:MSDNViewer = New-Object -ComObject InternetExplorer.Application
29 | }
30 | $Uri = "http://msdn2.microsoft.com/library/" + $this.GetType().FullName + ".ASPX"
31 | $global:MSDNViewer.Navigate2($Uri)
32 | $global:MSDNViewer.Visible = $TRUE
33 | }
--------------------------------------------------------------------------------
/MyScripts/Add-OneDriveRightClickMenu.ps1:
--------------------------------------------------------------------------------
1 | function Add-OneDriveRightClickMenu {
2 | [CmdletBinding()]
3 | Param(
4 | [Parameter(Mandatory=$True)]
5 | [string]$MenuOptionTitle,
6 |
7 | [Parameter(Mandatory=$True)]
8 | [string]$PathTo365FileUploadScript
9 | )
10 |
11 | #region >> Helper Functions
12 |
13 | function Get-Elevation {
14 | if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.Platform -eq "Win32NT" -or $PSVersionTable.PSVersion.Major -le 5) {
15 | [System.Security.Principal.WindowsPrincipal]$currentPrincipal = New-Object System.Security.Principal.WindowsPrincipal(
16 | [System.Security.Principal.WindowsIdentity]::GetCurrent()
17 | )
18 |
19 | [System.Security.Principal.WindowsBuiltInRole]$administratorsRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
20 |
21 | if($currentPrincipal.IsInRole($administratorsRole)) {
22 | return $true
23 | }
24 | else {
25 | return $false
26 | }
27 | }
28 |
29 | if ($PSVersionTable.Platform -eq "Unix") {
30 | if ($(whoami) -eq "root") {
31 | return $true
32 | }
33 | else {
34 | return $false
35 | }
36 | }
37 | }
38 |
39 | #endregion >> Helper Functions
40 |
41 |
42 | #region >> Prep
43 |
44 | if ($PSVersionTable.Platform -ne 'Win32NT' -and $PSVersionTable.PSEdition -ne 'Desktop') {
45 | Write-Error "Only run the {0} function from a Windows operating system! Halting!" -f $MyInvocation.MyCommand
46 | $global:FunctionResult = "1"
47 | return
48 | }
49 |
50 | <#
51 | if (!$(Get-Elevation)) {
52 | Write-Error "You must run this script/function as Administrator! Halting!"
53 | $global:FunctionResult = 1
54 | return
55 | }
56 | #>
57 |
58 | if (Get-Elevation) {
59 | Write-Error "You must NOT run this script/function as Administrator! Halting!"
60 | $global:FunctionResult = 1
61 | return
62 | }
63 |
64 | # Make sure $PathTo365FileUploadScript exists. If not, halt.
65 | if (!$(Test-Path -Path $PathTo365FileUploadScript)) {
66 | Write-Error "The path '$PathTo365FileUploadScript' does not exist! Halting!"
67 | return
68 | }
69 |
70 | #endregion >> Prep
71 |
72 | #region >> Main
73 |
74 | <#
75 | # Create the following Registry Keys if they don't already exist
76 | # HKEY_CLASSES_ROOT\*\shell\SyncWithOneDrive\command
77 | # Everything up to Computer\HKEY_CLASSES_ROOT\*\shell should already exist by default
78 | # HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\SyncWithOneDrive\command
79 | # Everything up to Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers should exist by default
80 |
81 | $RegistryPathsToCheck = @(
82 | 'Registry::HKEY_CLASSES_ROOT\*\shell\{0}\command' -f $MenuOptionTitle
83 | 'Registry::HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\{0}\command' -f $MenuOptionTitle
84 | )
85 | foreach ($RegPath in $RegistryPathsToCheck) {
86 | Push-Location -PSPath 'Registry::HKEY_CLASSES_ROOT\*\'
87 | $RelativePath = $RegPath -replace 'Registry::HKEY_CLASSES_ROOT\\\*','.'
88 |
89 | if (!$(Test-Path -PSPath $RegPath)) {
90 | $null = New-Item -Path $RelativePath -Force -ErrorAction Stop
91 | }
92 |
93 | # Check the (Default) String/REG_SZ values for the "command" key
94 | $RegistryItem = Get-Item $RelativePath
95 | $RegItemDefaultValue = $($RegistryItem | Get-ItemProperty).'(default)'
96 | $RegValueTarget = '"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoExit -File "{0}" "%1"' -f $PathTo365FileUploadScript
97 | if ($RegItemDefaultValue -ne $RegValueTarget) {
98 | # Update the (Default) String/REG_SZ values for the "command" keys
99 | $null = Set-Item -Path $RelativePath -Value $RegValueTarget
100 | }
101 |
102 | Pop-Location
103 | }
104 | #>
105 |
106 | #$FileName = $($PathTo365FileUploadScript | Split-Path -Leaf) -replace '\.ps1','.lnk'
107 | $LnkShortcutPath = "$HOME\AppData\Roaming\Microsoft\Windows\SendTo\{0}.lnk" -f $MenuOptionTitle
108 | $WshShell = New-Object -comObject WScript.Shell
109 | $Shortcut = $WshShell.CreateShortcut($LnkShortcutPath)
110 | $Shortcut.TargetPath = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
111 | $Shortcut.Arguments = "-ExecutionPolicy Bypass -NoExit -NoProfile -File $PathTo365FileUploadScript"
112 | $Shortcut.Save()
113 |
114 | #endregion >> Main
115 | }
116 |
117 | $AddRightClickParams = @{
118 | MenuOptionTitle = 'SyncWithOneDrive' # Some string that can fit in the mouse right-click menu
119 | PathTo365FileUploadScript = 'C:\Scripts\powershell\Invoke-365FileUpload.ps1' # Full Path to Invoke-365FileUpload.ps1, for example 'C:\Scripts\powershell\Invoke-365FileUpload.ps1'
120 | }
121 | Add-OneDriveRightClickMenu @AddRightClickParams
122 |
--------------------------------------------------------------------------------
/MyScripts/Get-DiskInfo.ps1:
--------------------------------------------------------------------------------
1 | # It's ugly...
2 |
3 | # Make sure NTFSSecurity module is loaded
4 | $ModuleName = "NTFSSecurity"
5 | if (!$(Get-Module -ListAvailable $ModuleName -ErrorAction SilentlyContinue)) {
6 | try {
7 | Install-Module $ModuleName -AllowClobber -Force -AcceptLicense -ErrorAction Stop
8 | } catch {
9 | Write-Error $_
10 | Write-Error "Unable to install $ModuleName Module! Halting!"
11 | return
12 | }
13 | }
14 | try {
15 | Import-Module $ModuleName -ErrorAction Stop
16 | } catch {
17 | Write-Error $_
18 | Write-Error "Unable to import $ModuleName Module! Halting!"
19 | return
20 | }
21 |
22 | # Gather all disk, partition, and volume information
23 | $diskInfo = Get-Disk
24 | $partitionInfo = Get-Partition
25 | $volumeInfo = Get-Volume
26 | $ntfsDiskInfo = Get-DiskSpace
27 |
28 | # Combine and display the information in a custom object
29 | $storageInfo = $diskInfo | ForEach-Object {
30 | $disk = $_
31 | $partitions = $partitionInfo | Where-Object DiskNumber -eq $disk.Number
32 | $partitions | ForEach-Object {
33 | $partition = $_
34 | $volume = $volumeInfo | Where-Object { $_.DriveLetter -eq $partition.DriveLetter } | Select-Object -First 1
35 | [PSCustomObject]@{
36 | DiskNumber = $disk.Number
37 | DiskModel = $disk.Model
38 | DiskSizeGB = "{0:N3}" -f [math]::Round($disk.Size / 1GB, 3)
39 | PartitionNumber = $partition.PartitionNumber
40 | PartitionSizeGB = "{0:N3}" -f [math]::Round($partition.Size / 1GB, 3)
41 | VolumeDriveLetter = $volume.DriveLetter
42 | VolumeLabel = $volume.FileSystemLabel
43 | FileSystem = $volume.FileSystem
44 | UsedSpaceGB = if ($volume) {
45 | "{0:N3}" -f [math]::Round(($volume.Size - $volume.SizeRemaining) / 1GB, 3)
46 | } else {
47 | $relevantNTFSDiskInfoObj = $ntfsDiskInfo | Where-Object {$partition.AccessPaths -match [regex]::Escape($_.DriveName)}
48 | if ($relevantNTFSDiskInfoObj) {
49 | $sizeString = $relevantNTFSDiskInfoObj.UsedSpaceUnitSize
50 | $sizeStringNoUnits = [double]($sizeString -replace '[^\d.]')
51 | if ($sizeString -match "GB") {
52 | "{0:N3}" -f $sizeStringNoUnits
53 | } elseif ($sizeString -match "MB"){
54 | "{0:N3}" -f ($sizeStringNoUnits / 1024)
55 | } else {
56 | "Units are not GB or MB"
57 | }
58 | } else {
59 | "Unable to find matching object from NTFSSecurity Module's Get-DiskSpace output"
60 | }
61 | }
62 | FreeSpaceGB = if ($volume) {
63 | "{0:N3}" -f [math]::Round($volume.SizeRemaining / 1GB, 3)
64 | } else {
65 | $relevantNTFSDiskInfoObj = $ntfsDiskInfo | Where-Object {$partition.AccessPaths -match [regex]::Escape($_.DriveName)}
66 | if ($relevantNTFSDiskInfoObj) {
67 | $sizeString = $relevantNTFSDiskInfoObj.AvailableFreeSpaceUnitSize
68 | $sizeStringNoUnits = [double]($sizeString -replace '[^\d.]')
69 | if ($sizeString -match "GB") {
70 | "{0:N3}" -f $sizeStringNoUnits
71 | } elseif ($sizeString -match "MB"){
72 | "{0:N3}" -f ($sizeStringNoUnits / 1024)
73 | } else {
74 | "Units are not GB or MB"
75 | }
76 | } else {
77 | "Unable to find matching object from NTFSSecurity Module's Get-DiskSpace output"
78 | }
79 | }
80 | FreeSpacePercent = if ($volume) {
81 | "{0:N3}" -f [math]::Round($volume.SizeRemaining / $volume.Size * 100, 3)
82 | } else {
83 | $relevantNTFSDiskInfoObj = $ntfsDiskInfo | Where-Object {$partition.AccessPaths -match [regex]::Escape($_.DriveName)}
84 | if ($relevantNTFSDiskInfoObj) {
85 | "{0:N3}" -f [double]($relevantNTFSDiskInfoObj.AvailableFreeSpacePercent -replace '%','')
86 | } else {
87 | "Unable to find matching object from NTFSSecurity Module's Get-DiskSpace output"
88 | }
89 | }
90 | }
91 | }
92 | }
93 | $storageInfo
--------------------------------------------------------------------------------
/MyScripts/Install-Pwsh.ps1:
--------------------------------------------------------------------------------
1 | function Install-Pwsh {
2 | [CmdletBinding()]
3 | Param()
4 |
5 | # Setup bin and log paths
6 | $LogFileDir = "C:\Scripts\logs\PwshInstall"
7 | $LogFilePath = $LogFileDir + '\' + 'pwsh_install_' + $(Get-Date -Format MMddyy_hhmmss) + '.log'
8 | $BinFileDir = "C:\Scripts\bin"
9 | $BinFilePath = $BinFileDir + '\' + 'pwsh.exe'
10 | try {
11 | if (!$(Test-Path $LogFileDir)) {$null = New-Item -Path $LogFileDir -ItemType Directory -Force -ErrorAction Stop}
12 | if (!$(Test-Path $BinFileDir)) {$null = New-Item -Path $BinFileDir -ItemType Directory -Force -ErrorAction Stop}
13 | } catch {
14 | $ErrMsg = $_.Exception.Message
15 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
16 | Write-Error $_
17 | return
18 | }
19 |
20 | # Check for where we expect pwsh 7 to be and if it is available in terminal
21 | $Pwsh7BinCheck = Test-Path "$env:SystemDrive\Program Files\PowerShell\7\pwsh.exe"
22 | $PwshCommandCheck = Get-Command pwsh -ErrorAction SilentlyContinue
23 |
24 | if (!$Pwsh7BinCheck -or !$PwshCommandCheck -or $PwshCommandCheck.Version.Major -lt 7) {
25 | try {
26 | # Set PowerShell to TLS 1.2
27 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
28 |
29 | # Install pwsh
30 | $null = Invoke-Expression "& {$(Invoke-RestMethod https://aka.ms/install-powershell.ps1)} -UseMSI -Quiet" -ErrorAction Stop
31 |
32 | # Refresh PATH
33 | $env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'User')
34 |
35 | $LogMsg = "Pwsh has been installed."
36 | $null = Add-Content -Path $LogFilePath -Value $LogMsg
37 | # Output
38 | Get-Command pwsh
39 | return
40 | } catch {
41 | $ErrMsg = $_.Exception.Message
42 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
43 | Write-Error $ErrMsg
44 | return
45 | }
46 | } else {
47 | $LogMsg = "Pwsh version $($PwshCommandCheck.Version.ToString()) is already installed. No action taken."
48 | $null = Add-Content -Path $LogFilePath -Value $LogMsg
49 | # Output
50 | Get-Command pwsh
51 | return
52 | }
53 | }
54 |
55 | Install-Pwsh
--------------------------------------------------------------------------------
/MyScripts/Install-SSHD.ps1:
--------------------------------------------------------------------------------
1 | function Get-Elevation {
2 | if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.Platform -eq "Win32NT" -or $PSVersionTable.PSVersion.Major -le 5) {
3 | [System.Security.Principal.WindowsPrincipal]$currentPrincipal = New-Object System.Security.Principal.WindowsPrincipal(
4 | [System.Security.Principal.WindowsIdentity]::GetCurrent()
5 | )
6 |
7 | [System.Security.Principal.WindowsBuiltInRole]$administratorsRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
8 |
9 | if($currentPrincipal.IsInRole($administratorsRole)) {
10 | return $true
11 | }
12 | else {
13 | return $false
14 | }
15 | }
16 |
17 | if ($PSVersionTable.Platform -eq "Unix") {
18 | if ($(whoami) -eq "root") {
19 | return $true
20 | }
21 | else {
22 | return $false
23 | }
24 | }
25 | }
26 |
27 | $LogFileDir = "C:\Scripts\logs\SSHDInstall"
28 | $LogFilePath = $LogFileDir + '\' + 'sshd_install_' + $(Get-Date -Format MMddyy_hhmmss) + '.log'
29 | try {
30 | if (!$(Test-Path $LogFileDir)) {$null = New-Item -Path $LogFileDir -ItemType Directory -Force -ErrorAction Stop}
31 | } catch {
32 | $ErrMsg = $_.Exception.Message
33 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
34 | Write-Error $_
35 | return
36 | }
37 |
38 | if (!$(Get-Elevation)) {
39 | $ErrMsg = "You need to run this script as an administrator."
40 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
41 | Write-Error $ErrMsg
42 | return
43 | }
44 |
45 | if ($PSVersionTable.PSEdition -ne "Desktop") {
46 | $ErrMsg = "This script is only supported on Windows Desktop Edition."
47 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
48 | Write-Error $ErrMsg
49 | return
50 | }
51 |
52 | try {
53 | $SSHDCheck = Get-WindowsCapability -Online -ErrorAction Stop | Where-Object {$_.Name -match 'OpenSSH\.Server'}
54 | } catch {
55 | $ErrMsg = $_.Exception.Message
56 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
57 | Write-Error $_
58 | return
59 | }
60 |
61 | if ($SSHDCheck.State -ne "Installed") {
62 | try {
63 | Write-Host "Installing SSHD service..."
64 | $InstallSSHDResult = Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 -ErrorAction Stop
65 | } catch {
66 | $ErrMsg = $_.Exception.Message
67 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
68 | Write-Error $_
69 | return
70 | }
71 |
72 | try {
73 | Write-Host "Setting SSHD default shell to powershell.exe"
74 | $PowerShellBinPath = $(Get-Command "powershell.exe").Source
75 | Set-ItemProperty -Path HKLM:\SOFTWARE\OpenSSH -Name DefaultShell -Value $PowerShellBinPath -ErrorAction Stop
76 | $SSHDService = Get-Service sshd -ErrorAction Stop
77 | $SSHDService | Set-Service -StartupType Automatic -ErrorAction Stop
78 | $SSHDService | Start-Service -ErrorAction Stop
79 | } catch {
80 | $ErrMsg = $_.Exception.Message
81 | $null = Add-Content -Path $LogFilePath -Value $ErrMsg
82 | Write-Error $_
83 | return
84 | }
85 | }
--------------------------------------------------------------------------------
/MyScripts/NOTES/UsingMiniServe.ps1:
--------------------------------------------------------------------------------
1 | # Miniserve ideal command parameters
2 | miniserve -i 192.168.2.203 -i 127.0.0.1 -p 8080 --qrcode --upload-files --mkdir --media-type image --overwrite-files --enable-tar --enable-tar-gz --enable-zip --dirs-first --show-symlink-info --show-wget-footer C:/test_folder
3 | # NOTE: In this example, within $HOME/test_folder are files and directories, one of which is a directory called "temp"
4 | # If we want to recursively download the contents of "temp"...
5 |
6 | # On Linux:
7 | wget -rcnHp -R 'index.html*' --cut-dirs=2 -P $HOME/Downloads/temp 'http://192.168.2.203:8080/temp/?raw=true'
8 |
9 | # Windows Equivalent:
10 | # Just install and use wget via:
11 | winget install GNU.Wget2
12 | $destinationDir = "$HOME/Downloads/temp"
13 | if (!(Test-Path -Path $destinationDir)) {$null = New-Item -Path $destinationDir -ItemType Directory -Force}
14 | Push-Location $destinationdir
15 | wget2 -rcnHp -R 'index.html*' --cut-dirs=2 'http://192.168.2.203:8080/temp/?raw=true'
16 | # For some reason winget2 doesn't honor -R parameter, so we need to cleanup after...
17 | Get-ChildItem -Path $destinationDir -Recurse -File -Filter 'index.html*' | Remove-Item -Force
18 | Pop-Location
19 |
20 | # ...OR if you want pure PowerShell:
21 | $OSSeparator = [System.IO.Path]::DirectorySeparatorChar
22 | $baseUrl = 'http://localhost:8080'
23 | $sourceUrl = $baseUrl + '/' + 'temp/?raw=true'
24 | $destinationDir = $HOME + $OSSeparator + 'Downloads' + $OSSeparator + 'temp'
25 | if (!(Test-Path -Path $destinationDir)) {$null = New-Item -Path $destinationDir -ItemType Directory -Force}
26 | function Download-FilesRecursively {
27 | param (
28 | [string]$Url,
29 | [string]$DirPath
30 | )
31 |
32 | $OSSeparator = [System.IO.Path]::DirectorySeparatorChar
33 | $baseUrl = ($Url -split '/')[0..2] -join '/'
34 | $IWRResult = Invoke-WebRequest $Url
35 | $FolderLinks = $IWRResult.links | Where-Object {$_.outerHTML -match [regex]::Escape('class="directory"')}
36 | $FileLinks = $IWRResult.links | Where-Object {$_.outerHTML -match [regex]::Escape('class="file"')}
37 |
38 | foreach ($folderLink in $FolderLinks) {
39 | $folderUrl = $baseUrl + [System.Uri]::new($folderLink.href, [System.UriKind]::RelativeOrAbsolute).OriginalString
40 | $folderPath = $DirPath + $OSSeparator + ($folderLink.outerHTML -split '/')[-4]
41 | Write-Host "Creating directory $folderPath ..."
42 | $null = New-Item -Path $folderPath -ItemType Directory -ErrorAction SilentlyContinue
43 | Download-FilesRecursively -Url $folderUrl -DirPath $folderPath
44 | }
45 |
46 | foreach ($fileLink in $FileLinks) {
47 | $fileUrl = $baseUrl + [System.Uri]::new($fileLink.href, [System.UriKind]::RelativeOrAbsolute).OriginalString
48 | $filePath = $DirPath + $OSSeparator + ($fileLink.href -split '/')[-1]
49 | Write-Host "Downloading $fileUrl to $filePath ..."
50 | Invoke-WebRequest -Uri $fileUrl -OutFile $filePath
51 | }
52 | }
53 | Download-FilesRecursively -Url $sourceUrl -DirPath $destinationDir
--------------------------------------------------------------------------------
/MyScripts/New-ModernGmailEmail.ps1:
--------------------------------------------------------------------------------
1 | $ModuleName = 'Send-MailKitMessage'
2 | if (!$(Get-Module -ListAvailable $ModuleName -ErrorAction SilentlyContinue)) {
3 | try {
4 | $InstallModuleResult = Install-Module $ModuleName -AllowClobber -Force -ErrorAction Stop -WarningAction SilentlyContinue
5 | Import-Module $ModuleName -ErrorAction Stop
6 | } catch {
7 | Write-Warning $_.Exception.Message
8 | Write-Error "Unable to install $ModuleName module! Halting!"
9 | $global:FunctionResult = "1"
10 | return
11 | }
12 | }
13 |
14 | <#
15 | Send-MailKitMessage -SMTPServer -Port -From -RecipientList
16 | [-UseSecureConnectionIfAvailable] [-Credential ] [-CCList ] [-BCCList
17 | ] [-Subject ] [-TextBody ] [-HTMLBody ] [-AttachmentList ]
18 | #>
19 | $SMTPServer = "smtp.gmail.com"
20 | $SMTPPort = "587"
21 | $GmailAuthString = 'thisisnotrealaaa'
22 | $UserName = "jsmith@gmail.com"
23 | $SenderName = "John Smith"
24 | $SenderEmail = $UserName
25 | $RecipientName = "Jane Doe"
26 | $RecipientEmail = "jdoe@domain.com"
27 | $From = [MimeKit.MailboxAddress]::new($SenderName, $SenderEmail)
28 | $Recipients = [MimeKit.InternetAddressList]::new()
29 | $Recipients.Add([MimeKit.MailboxAddress]::new($RecipientName, $RecipientEmail))
30 | [securestring]$Psswd = ConvertTo-SecureString $GmailAuthString -AsPlainText -Force
31 | $Creds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $UserName, $Psswd
32 |
33 | $SMKMParams = @{
34 | SmtpServer = $SMTPServer
35 | Port = $SMTPPort
36 | From = $From
37 | RecipientList = $Recipients
38 | UseSecureConnectionIfAvailable = $True
39 | Credential = $Creds
40 | Subject = "$env:ComputerName ALERT"
41 | TextBody = 'This is a test'
42 | }
43 | Send-MailKitMessage @SMKMParams
--------------------------------------------------------------------------------
/MyScripts/Start-VSCodeRemote.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .SYNOPSIS
3 | PowerShell function wrapper for the command
4 |
5 | code --folder-uri vscode-remote://ssh-remote+adminuser@192.168.1.2/C:/Users/adminuser
6 |
7 | .DESCRIPTION
8 | See Synopsis
9 |
10 | .NOTES
11 | DEPENDENCEIES
12 | ssh.exe
13 | .PARAMETER
14 | N parameter
15 | .PARAMETER
16 | N+1 parameter
17 | .EXAMPLE
18 | Start-VSCodeRemote -RemoteUserName "adminuser" -RemoteIPAddress "192.168.1.2" -RemoteWorkingDir "C:\Users\adminuser"
19 | .EXAMPLE
20 | Another example of how to use this cmdlet
21 | .INPUTS
22 | Inputs to this cmdlet (if any)
23 | .OUTPUTS
24 | Output from this cmdlet (if any)
25 | #>
26 | function Start-VSCodeRemote {
27 | [CmdletBinding()]
28 | Param(
29 | [Parameter(Mandatory=$True)]
30 | [string]$RemoteUserName, # Example: "adminuser"
31 |
32 | [Parameter(Mandatory=$True)]
33 | [string]$RemoteIPAddress, # Example: "192.168.1.2"
34 |
35 | [Parameter(Mandatory=$True)]
36 | [string]$RemoteWorkingDir # Example: "C:\Users\adminuser"
37 | )
38 |
39 | # Make sure we have all of the necessary binaries on the local machine
40 | try {
41 | $null = Get-Command ssh -ErrorAction Stop
42 | } catch {
43 | Write-Error $_
44 | return
45 | }
46 |
47 | # Check to make sure local VSCode instance has the necessary extensions installed
48 | $RequiredExtensions = @(
49 | "ms-vscode-remote.remote-ssh"
50 | "ms-vscode-remote.remote-ssh-edit"
51 | "ms-vscode-remote.remote-wsl"
52 | "ms-vscode-remote.remote-wsl-edit"
53 | "ms-vscode-remote.vscode-remote-extensionpack"
54 | "ms-vscode-remote.remote-containers"
55 | "ms-vscode.remote-explorer"
56 | "ms-vscode.remote-server"
57 | )
58 | $InstalledExtensions = code --list-extensions
59 | $MissingExtensions = $RequiredExtensions | Where-Object {$InstalledExtensions -notcontains $_}
60 | if ($MissingExtensions) {
61 | Write-Warning "The following extensions are missing from the local VSCode instance: $MissingExtensions"
62 | # Install the missing extensions
63 | $MissingExtensions | ForEach-Object {
64 | code --install-extension $_
65 | }
66 | }
67 |
68 | $CmdString = "code --folder-uri vscode-remote://ssh-remote+$RemoteUserName@$RemoteIPAddress/$RemoteWorkingDir"
69 | Write-Host "`$CmdString is $CmdString"
70 |
71 | Invoke-Expression $CmdString
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/MyScripts/Upgrade-Winget.ps1:
--------------------------------------------------------------------------------
1 | <#=============================================================================================
2 | Script by : Leo Nguyen
3 | Website : www.bonguides.com
4 | Telegram : https://t.me/bonguides
5 | Discord : https://discord.gg/fUVjuqexJg
6 | YouTube : https://www.youtube.com/@BonGuides
7 |
8 | Script Highlights:
9 | ~~~~~~~~~~~~~~~~~
10 | #. Install Windows Package Manager (winget).
11 | ============================================================================================#>
12 |
13 | if (-not([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
14 | Write-Warning "You need to have Administrator rights to run this script!`nPlease re-run this script as an Administrator in an elevated powershell prompt!"
15 | break
16 | }
17 |
18 |
19 | # Install Windows Package Manager on Windows Sandbox
20 | if (Test-Path 'C:\Users\WDAGUtilityAccount') {
21 | Write-Host "`nYou're using Windows Sandbox." -ForegroundColor Yellow
22 | irm bonguides.com/wsb/winget | iex
23 | } else {
24 |
25 | # Create temporary directory
26 | $null = New-Item -Path $env:temp\temp -ItemType Directory -Force
27 | Set-Location $env:temp\temp
28 | $path = "$env:temp\temp"
29 |
30 | # Install C++ Runtime framework packages for Desktop Bridge
31 | $ProgressPreference='Silent'
32 | $url = 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
33 | (New-Object Net.WebClient).DownloadFile($url, "$env:temp\temp\Microsoft.VCLibs.x64.14.00.Desktop.appx")
34 | Add-AppxPackage -Path Microsoft.VCLibs.x64.14.00.Desktop.appx -ErrorAction SilentlyContinue | Out-Null
35 |
36 | # Install Microsoft.UI.Xaml through Nuget.
37 | Write-Host "Downloading Windows Package Manager..." -ForegroundColor Green
38 | $ProgressPreference='Silent'
39 | Invoke-WebRequest -Uri 'https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.7.3/Microsoft.UI.Xaml.2.7.x64.appx' -OutFile 'Microsoft.UI.Xaml.2.7.x64.appx'
40 | # Invoke-WebRequest -Uri 'https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.x64.appx' -OutFile 'Microsoft.UI.Xaml.2.8.x64.appx'
41 |
42 | Add-AppxPackage Microsoft.UI.Xaml.2.7.x64.appx
43 | # Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx
44 |
45 | # Download winget and license file the install it
46 | Write-Host "Installing Windows Package Manager..." -ForegroundColor Green
47 | function getLink($match) {
48 | $uri = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
49 | $get = Invoke-RestMethod -uri $uri -Method Get -ErrorAction stop
50 | $data = $get[0].assets | Where-Object name -Match $match
51 | return $data.browser_download_url
52 | }
53 |
54 | $url = getLink("msixbundle")
55 | $licenseUrl = getLink("License1.xml")
56 |
57 | # Finally, install winget
58 | $fileName = 'winget.msixbundle'
59 | $licenseName = 'license1.xml'
60 |
61 | (New-Object Net.WebClient).DownloadFile($url, "$env:temp\temp\$fileName")
62 | (New-Object Net.WebClient).DownloadFile($licenseUrl, "$env:temp\temp\$licenseName")
63 |
64 | Add-AppxProvisionedPackage -Online -PackagePath $fileName -LicensePath $licenseName | Out-Null
65 | Write-Host "The Windows Package Manager has been installed." -ForegroundColor Green
66 |
67 | # Cleanup
68 | Remove-Item $path\* -Recurse -Force
69 | }
--------------------------------------------------------------------------------
/MyScripts/compare_dirs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # USAGE: ./compare_dirs.sh /path/to/directory1 /path/to/directory2
3 |
4 | # Directories to compare
5 | DIR1="$1"
6 | DIR2="$2"
7 |
8 | # Temporary files to store output of md5 sums and filenames
9 | TEMP_FILE1="$(mktemp /tmp/dedup1.XXXXXX)"
10 | TEMP_FILE2="$(mktemp /tmp/dedup2.XXXXXX)"
11 |
12 | # Ensure both directories are specified
13 | if [ -z "$DIR1" ] || [ -z "$DIR2" ]; then
14 | echo "Usage: $0 [directory1] [directory2]"
15 | exit 1
16 | fi
17 |
18 | # Find all files in the first directory, calculate their MD5 checksums, and store results in temp file 1
19 | find "$DIR1" -type f -exec md5 -r {} + > "$TEMP_FILE1"
20 |
21 | # Find all files in the second directory, do the same, and store in temp file 2
22 | find "$DIR2" -type f -exec md5 -r {} + > "$TEMP_FILE2"
23 |
24 | # Process the results to find duplicates between the two directories
25 | awk '{ print $1 }' "$TEMP_FILE1" "$TEMP_FILE2" | sort | uniq -d | while read checksum; do
26 | echo "Duplicates for checksum $checksum:"
27 | grep $checksum "$TEMP_FILE1" "$TEMP_FILE2" | awk '{print $2}'
28 | done
29 |
30 | # Clean up temporary files
31 | rm "$TEMP_FILE1" "$TEMP_FILE2"
32 |
--------------------------------------------------------------------------------
/MyScripts/deduplicate.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # USAGE: ./deduplicate.sh /path/to/directory
3 |
4 | # Directory to search for duplicate files
5 | SEARCH_DIR="$1"
6 |
7 | # Temporary file to store output of md5 sums and filenames
8 | TEMP_FILE="$(mktemp /tmp/dedup.XXXXXX)"
9 |
10 | # Ensure the directory is specified
11 | if [ -z "$SEARCH_DIR" ]; then
12 | echo "Usage: $0 [directory]"
13 | exit 1
14 | fi
15 |
16 | # Find all files in the specified directory, calculate their MD5 checksums, and store results in a temp file
17 | find "$SEARCH_DIR" -type f -exec md5 -r {} + > "$TEMP_FILE"
18 |
19 | # Process the results to find duplicates
20 | awk '{ print $1 }' "$TEMP_FILE" | sort | uniq -d | while read checksum; do
21 | echo "Duplicates for checksum $checksum:"
22 | grep $checksum "$TEMP_FILE" | awk '{print $2}'
23 | done
24 |
25 | # Clean up temporary file
26 | rm "$TEMP_FILE"
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # misc-powershell
2 | Miscellaneous PowerShell Scripts, Functions, and Modules as well as Sublime IDE Snippets
3 |
4 | TODO: Create github.io page with more information. Until then please read the detailed help text for the Function/Module you are interested in.
--------------------------------------------------------------------------------
/ThirdPartyRefactors/Modules/Await/Await.psd1:
--------------------------------------------------------------------------------
1 | #
2 | # Module manifest for module 'Await'
3 | #
4 | # Generated by: Lee Holmes
5 | #
6 |
7 | @{
8 |
9 | ModuleToProcess = 'Await.psm1'
10 |
11 | FunctionsToExport = 'Start-AwaitSession', 'Stop-AwaitSession', 'Send-AwaitCommand',
12 | 'Receive-AwaitResponse', 'Wait-AwaitResponse'
13 | AliasesToExport = 'spawn', 'saas', 'spas', 'sendac', 'sdac', 'expect', 'war', 'expect?', 'rcar'
14 |
15 | ModuleVersion = '0.8'
16 |
17 | GUID = '5fc00d79-9947-4a3c-be93-a75c9c3aa9e1'
18 |
19 | Author = 'Lee Holmes'
20 |
21 | Description = 'Await - A modern implementation of EXPECT for Windows. For a demo, see: https://www.youtube.com/watch?v=tKyAVm7bXcQ'
22 |
23 | PowerShellVersion = '3.0'
24 |
25 | }
--------------------------------------------------------------------------------
/ThirdPartyRefactors/Modules/Await/PSGetModuleInfo.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pldmgg/misc-powershell/41006b9a08799aa3decbbee7155574c976e79f9c/ThirdPartyRefactors/Modules/Await/PSGetModuleInfo.xml
--------------------------------------------------------------------------------