├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── Bug.yml │ ├── FeatureRequest.yml │ ├── Formatting.yml │ ├── PoshFeed.yml │ └── PoshTip.yml └── workflows │ └── BuildAndPublishPosh.yml ├── @.ps1 ├── Assets ├── Get-Command-In-Color.gif ├── Get-Member-In-Color.gif ├── Improved-File-Formatting.gif ├── Posh-animated.svg ├── Posh.png ├── Posh.svg ├── Posh@1080p.png ├── Reflection-Formatting.gif ├── Regex-In-Color.gif └── XML-In-Color.gif ├── Build ├── GitHub │ └── Jobs │ │ └── BuildPosh.psd1 ├── Posh.GitHubWorkflow.PSDevOps.ps1 ├── Posh.HelpOut.ps1 ├── Posh.PSA.ps1 ├── Posh.PSSVG.ps1 ├── Posh.Splatter.ps1 └── Posh.ezout.ps1 ├── CHANGELOG.md ├── Demos ├── Posh.Profile.demo.ps1 ├── Posh.Prompt.demo.ps1 └── Posh.demo.ps1 ├── Formatting ├── Command.format.ps1 ├── FileHash.format.ps1 ├── FileSystem │ ├── FileSystemTypes-GroupingFormat.format.xml │ ├── FileSystemTypes.format.xml │ ├── FileTableView.format.ps1 │ └── FileTreeView.view.ps1 ├── MeasureInfo.format.ps1 ├── MemberDefinition.format.ps1 ├── PSEventArgs.format.ps1 ├── PSMemberInfo.format.ps1 ├── PSVariable.format.ps1 ├── Posh │ ├── Posh.Host.Cursor.format.ps1 │ ├── Posh.Host.format.ps1 │ ├── Posh.Input.format.ps1 │ ├── Posh.LinkControl.format.ps1 │ ├── Posh.Module.Link.format.ps1 │ ├── Posh.Module.Logo.format.ps1 │ ├── Posh.Module.Screenshot.format.ps1 │ ├── Posh.Module.Video.format.ps1 │ ├── Posh.Parameters.format.ps1 │ ├── Posh.PresetCollection.format.ps1 │ ├── Posh.Profiles.format.ps1 │ ├── Posh.Prompt.format.ps1 │ ├── Posh.RSS.Article.format.ps1 │ ├── Posh.RSS.Feed.format.ps1 │ ├── Posh.RSS.FeedCollection.format.ps1 │ ├── Posh.Recommendation.format.ps1 │ ├── Posh.Tip.Collection.format.ps1 │ └── Posh.Tip.Command.format.ps1 ├── Reflection │ ├── System.Reflection.MemberInfo.format.ps1 │ ├── System.Type.format.ps1 │ ├── TypeBaseControl.format.ps1 │ ├── TypeConstructorsControl.format.ps1 │ ├── TypeEventControl.format.ps1 │ ├── TypeEventsControl.format.ps1 │ ├── TypeFieldControl.format.ps1 │ ├── TypeInterfaceControl.format.ps1 │ ├── TypeMemberControl.format.ps1 │ ├── TypeMethodControl.format.ps1 │ ├── TypeMethodParameterControl.format.ps1 │ ├── TypeMethodsControl.format.ps1 │ ├── TypeNameControl.format.ps1 │ ├── TypePropertiesControl.format.ps1 │ └── TypePropertyControl.format.ps1 ├── RegEx │ ├── Match.format.ps1 │ └── MatchInfo.format.ps1 ├── Regex.format.ps1 ├── RichModuleInfo.view.ps1 ├── Service.format.ps1 ├── System.Diagnostics.Process.format.ps1 ├── System.Version.format.ps1 ├── TimeSpan.format.ps1 ├── TimeZone.format.ps1 ├── VersionControl.format.ps1 └── XML │ ├── SelectXmlInfo.format.ps1 │ ├── System.Xml.XmlElement.format.ps1 │ ├── XmlAttributeControl.format.ps1 │ └── XmlDocument.view.ps1 ├── LICENSE ├── Posh.format.ps1xml ├── Posh.ps.psm1 ├── Posh.psd1 ├── Posh.psm1 ├── Posh.types.ps1xml ├── Presets └── FileIcons.Posh.Preset.psd1 ├── README.md ├── README.ps.md ├── Tests ├── Posh.News.tests.ps1 ├── Posh.Prompt.tests.ps1 └── Posh.tests.ps1 ├── TipsAndTricks ├── AddingHashtables.Tip.ps1 ├── AssigningIfStatements.Tip.ps1 ├── AssigningLoopOutput.Tip.ps1 ├── CreatingPsuedoObjects.Trick.ps1 ├── EverythingIsAnObject.Tip.ps1 ├── GenericTypes.Tip.ps1 ├── LoopLabels.Tip.ps1 ├── MultipleAssignment.Tip.ps1 ├── NegativeIndexing.Tip.ps1 ├── NegativeIndexingFibonacci.Trick.ps1 ├── OrderedHashtables.Tip.ps1 ├── RangeOperator.Tip.ps1 ├── TernaryOperator.Tip.ps1 ├── TheParameterSetThatWasNotThere.Trick.ps1 ├── TrinityOfDiscoverability.Tip.ps1 └── YouCanGetHelpOnAScript.Tip.ps1 ├── Types ├── PSEventArgs │ ├── Alias.psd1 │ └── PSTypeName.txt ├── PSModuleInfo │ ├── Alias.psd1 │ ├── LinkList.ps1 │ ├── PSTypeName.txt │ ├── get_Demo.ps1 │ ├── get_Discussion.ps1 │ ├── get_Issue.ps1 │ ├── get_Link.ps1 │ ├── get_Logo.ps1 │ ├── get_ModuleProfile.ps1 │ ├── get_ModuleProfiles.ps1 │ ├── get_News.ps1 │ ├── get_Presentation.ps1 │ ├── get_Preset.ps1 │ ├── get_README.ps1 │ ├── get_Recommendation.ps1 │ ├── get_Screenshot.ps1 │ ├── get_Test.ps1 │ ├── get_Tip.ps1 │ └── get_Video.ps1 ├── Posh.Commands │ ├── Alias.psd1 │ ├── DefaultDisplay.txt │ ├── FindExtensions.ps.ps1 │ ├── FindExtensions.ps1 │ ├── get_AliasCount.ps1 │ ├── get_ApplicationCount.ps1 │ ├── get_CmdletCount.ps1 │ ├── get_Count.ps1 │ ├── get_Extended.ps1 │ └── get_FunctionCount.ps1 ├── Posh.Errors │ ├── LineLike.ps1 │ ├── LineMatch.ps1 │ ├── get_ByLine.ps1 │ ├── get_ByType.ps1 │ └── get_History.ps1 ├── Posh.ExtensionCollection │ ├── Posh.Preset.Collection │ │ └── README.md │ ├── Refresh.ps1 │ ├── get_All.ps1 │ ├── get_CommandType.ps1 │ ├── get_Count.ps1 │ ├── get_Module.ps1 │ ├── get_Path.ps1 │ ├── get_Random.ps1 │ ├── set_CommandType.ps1 │ ├── set_Module.ps1 │ └── set_Path.ps1 ├── Posh.Host.Cursor │ ├── Alias.psd1 │ ├── Back.ps1 │ ├── Down.ps1 │ ├── Forward.ps1 │ ├── Hide.ps1 │ ├── PageDown.ps1 │ ├── PageUp.ps1 │ ├── SetPosition.ps1 │ ├── Show.ps1 │ ├── Up.ps1 │ └── get_Position.ps1 ├── Posh.Host │ ├── Choose.ps1 │ ├── get_Cursor.ps1 │ ├── get_Height.ps1 │ ├── get_Title.ps1 │ ├── get_Width.ps1 │ └── set_Title.ps1 ├── Posh.NET │ ├── Alias.psd1 │ ├── PSTypeName.txt │ ├── Posh.NET.format.ps1 │ ├── README.md │ ├── Refresh.ps1 │ ├── get_Abstract.ps1 │ ├── get_Assembly.ps1 │ ├── get_Attribute.ps1 │ ├── get_Cmdlet.ps1 │ ├── get_Delegate.ps1 │ ├── get_Enum.ps1 │ ├── get_Exception.ps1 │ ├── get_ExtensionType.ps1 │ ├── get_Generic.ps1 │ ├── get_Interface.ps1 │ ├── get_Primitive.ps1 │ ├── get_Private.ps1 │ ├── get_Public.ps1 │ ├── get_Static.ps1 │ ├── get_Type.ps1 │ ├── get_TypeAccelerator.ps1 │ ├── get_ValueType.ps1 │ └── set_TypeAccelerator.ps1 ├── Posh.Parameters │ ├── Clear.ps1 │ ├── README.md │ ├── Remove.ps1 │ ├── SetDefault.ps1 │ ├── get_Defaults.ps1 │ └── set_Defaults.ps1 ├── Posh.Preset.Command │ ├── Alias.psd1 │ └── Use.ps1 ├── Posh.Profiles │ ├── Add.ps1 │ ├── ImportModule.ps1 │ ├── Matches.ps1 │ ├── New.ps1 │ ├── README.md │ ├── Remove.ps1 │ ├── RemoveModule.ps1 │ ├── Replace.ps1 │ ├── get_Current.ps1 │ ├── get_Directory.ps1 │ ├── get_File.ps1 │ └── get_Files.ps1 ├── Posh.RSS.Article │ ├── Alias.psd1 │ ├── get_DatePublished.ps1 │ └── get_Name.ps1 ├── Posh.RSS.Feed │ ├── Alias.psd1 │ ├── get_Article.ps1 │ └── get_Recent.ps1 ├── Posh.RSS.FeedCollection │ ├── Alias.psd1 │ ├── README.md │ ├── get_Feed.ps1 │ ├── get_Random.ps1 │ ├── get_Recent.ps1 │ ├── get_RecentDuration.ps1 │ └── set_RecentDuration.ps1 ├── Posh.Recommendation │ ├── Alias.psd1 │ └── Install.ps1 ├── Posh.Stackable │ ├── Alias.psd1 │ ├── Append.ps1 │ ├── Clear.ps1 │ ├── Pop.ps1 │ ├── Posh.Input │ │ └── README.md │ ├── Posh.Prompt │ │ └── README.md │ ├── Prepend.ps1 │ ├── Push.ps1 │ ├── Replace.ps1 │ ├── Stringify.ps1 │ ├── get_Current.ps1 │ └── set_Current.ps1 ├── Posh.Tip.Command │ └── get_Content.ps1 ├── Posh │ ├── Alias.psd1 │ ├── Posh.format.ps1 │ ├── get_Errors.ps1 │ ├── get_ExecutionContext.ps1 │ ├── get_History.ps1 │ ├── get_Host.ps1 │ ├── get_Jobs.ps1 │ ├── get_Modules.ps1 │ ├── get_NET.ps1 │ ├── get_Process.ps1 │ ├── get_Profiles.ps1 │ ├── get_Recommends.ps1 │ └── get_Runspace.ps1 └── TimeZoneInfo │ ├── PSTypeName.txt │ └── get_LocalTime.ps1 ├── contributing.md └── docs ├── Assets ├── Get-Command-In-Color.gif ├── Get-Member-In-Color.gif ├── Improved-File-Formatting.gif ├── Posh-animated.svg ├── Posh.png ├── Posh.svg ├── Posh@1080p.png ├── Reflection-Formatting.gif ├── Regex-In-Color.gif └── XML-In-Color.gif ├── CHANGELOG.md ├── CNAME ├── Posh.Commands.FindExtensions.md ├── Posh.Errors.LineLike.md ├── Posh.Errors.LineMatch.md ├── Posh.Errors.get_ByLine.md ├── Posh.Errors.get_ByType.md ├── Posh.Errors.get_History.md ├── Posh.ExtensionCollection.get_All.md ├── Posh.ExtensionCollection.get_CommandType.md ├── Posh.ExtensionCollection.get_Count.md ├── Posh.ExtensionCollection.get_Module.md ├── Posh.ExtensionCollection.get_Path.md ├── Posh.ExtensionCollection.get_Random.md ├── Posh.ExtensionCollection.set_CommandType.md ├── Posh.ExtensionCollection.set_Module.md ├── Posh.ExtensionCollection.set_Path.md ├── Posh.Host.Choose.md ├── Posh.Host.Cursor.Back.md ├── Posh.Host.Cursor.Down.md ├── Posh.Host.Cursor.Forward.md ├── Posh.Host.Cursor.Hide.md ├── Posh.Host.Cursor.PageDown.md ├── Posh.Host.Cursor.PageUp.md ├── Posh.Host.Cursor.SetPosition.md ├── Posh.Host.Cursor.Show.md ├── Posh.Host.Cursor.Up.md ├── Posh.Host.Cursor.get_Position.md ├── Posh.Host.get_Cursor.md ├── Posh.Host.get_Height.md ├── Posh.Host.get_Title.md ├── Posh.Host.get_Width.md ├── Posh.Host.set_Title.md ├── Posh.Input.Append.md ├── Posh.Input.Clear.md ├── Posh.Input.Pop.md ├── Posh.Input.Prepend.md ├── Posh.Input.Push.md ├── Posh.Input.Replace.md ├── Posh.Input.Stringify.md ├── Posh.Input.get_Current.md ├── Posh.Input.set_Current.md ├── Posh.Parameters.Clear.md ├── Posh.Parameters.Remove.md ├── Posh.Parameters.SetDefault.md ├── Posh.Preset.Collection.get_All.md ├── Posh.Preset.Collection.get_CommandType.md ├── Posh.Preset.Collection.get_Count.md ├── Posh.Preset.Collection.get_Module.md ├── Posh.Preset.Collection.get_Path.md ├── Posh.Preset.Collection.get_Random.md ├── Posh.Preset.Collection.set_CommandType.md ├── Posh.Preset.Collection.set_Module.md ├── Posh.Preset.Collection.set_Path.md ├── Posh.Preset.Command.Use.md ├── Posh.Profiles.Add.md ├── Posh.Profiles.ImportModule.md ├── Posh.Profiles.Matches.md ├── Posh.Profiles.New.md ├── Posh.Profiles.Remove.md ├── Posh.Profiles.RemoveModule.md ├── Posh.Profiles.Replace.md ├── Posh.Profiles.get_Current.md ├── Posh.Profiles.get_Directory.md ├── Posh.Profiles.get_File.md ├── Posh.Profiles.get_Files.md ├── Posh.Prompt.Append.md ├── Posh.Prompt.Clear.md ├── Posh.Prompt.Pop.md ├── Posh.Prompt.Prepend.md ├── Posh.Prompt.Push.md ├── Posh.Prompt.Replace.md ├── Posh.Prompt.Stringify.md ├── Posh.Prompt.get_Current.md ├── Posh.Prompt.set_Current.md ├── Posh.RSS.Article.get_DatePublished.md ├── Posh.RSS.Article.get_Name.md ├── Posh.RSS.Feed.get_Article.md ├── Posh.RSS.Feed.get_Recent.md ├── Posh.RSS.FeedCollection.get_Feed.md ├── Posh.RSS.FeedCollection.get_Random.md ├── Posh.RSS.FeedCollection.get_Recent.md ├── Posh.RSS.FeedCollection.get_RecentDuration.md ├── Posh.RSS.FeedCollection.set_RecentDuration.md ├── Posh.Stackable.Append.md ├── Posh.Stackable.Clear.md ├── Posh.Stackable.Pop.md ├── Posh.Stackable.Prepend.md ├── Posh.Stackable.Push.md ├── Posh.Stackable.Replace.md ├── Posh.Stackable.Stringify.md ├── Posh.Stackable.get_Current.md ├── Posh.Stackable.set_Current.md ├── Posh.get_Errors.md ├── Posh.get_History.md ├── Posh.get_Host.md ├── Posh.get_Jobs.md ├── Posh.get_Modules.md ├── Posh.get_Process.md ├── Posh.get_Runspace.md ├── Posh ├── Commands │ ├── FindExtensions.md │ └── README.md ├── Errors │ ├── LineLike.md │ ├── LineMatch.md │ ├── README.md │ ├── get_ByLine.md │ ├── get_ByType.md │ └── get_History.md ├── ExtensionCollection │ ├── README.md │ ├── get_All.md │ ├── get_CommandType.md │ ├── get_Count.md │ ├── get_Module.md │ ├── get_Path.md │ ├── get_Random.md │ ├── set_CommandType.md │ ├── set_Module.md │ └── set_Path.md ├── Host │ ├── Choose.md │ ├── Cursor │ │ ├── Back.md │ │ ├── Down.md │ │ ├── Forward.md │ │ ├── Hide.md │ │ ├── PageDown.md │ │ ├── PageUp.md │ │ ├── README.md │ │ ├── SetPosition.md │ │ ├── Show.md │ │ ├── Up.md │ │ └── get_Position.md │ ├── README.md │ ├── get_Cursor.md │ ├── get_Height.md │ ├── get_Title.md │ ├── get_Width.md │ └── set_Title.md ├── Input │ ├── Append.md │ ├── Clear.md │ ├── Pop.md │ ├── Prepend.md │ ├── Push.md │ ├── README.md │ ├── Replace.md │ ├── Stringify.md │ ├── get_Current.md │ └── set_Current.md ├── NET │ ├── README.md │ ├── get_Abstract.md │ ├── get_Assembly.md │ ├── get_Attribute.md │ ├── get_Cmdlet.md │ ├── get_Delegate.md │ ├── get_Enum.md │ ├── get_Exception.md │ ├── get_ExtensionType.md │ ├── get_Generic.md │ ├── get_Interface.md │ ├── get_Primitive.md │ ├── get_Private.md │ ├── get_Public.md │ ├── get_Static.md │ ├── get_Type.md │ ├── get_TypeAccelerator.md │ ├── get_ValueType.md │ └── set_TypeAccelerator.md ├── Parameters │ ├── Clear.md │ ├── README.md │ ├── Remove.md │ └── SetDefault.md ├── Preset │ ├── Collection │ │ ├── README.md │ │ ├── get_All.md │ │ ├── get_CommandType.md │ │ ├── get_Count.md │ │ ├── get_Module.md │ │ ├── get_Path.md │ │ ├── get_Random.md │ │ ├── set_CommandType.md │ │ ├── set_Module.md │ │ └── set_Path.md │ └── Command │ │ ├── README.md │ │ └── Use.md ├── Profiles │ ├── Add.md │ ├── ImportModule.md │ ├── Matches.md │ ├── New.md │ ├── README.md │ ├── Remove.md │ ├── RemoveModule.md │ ├── Replace.md │ ├── get_Current.md │ ├── get_Directory.md │ ├── get_File.md │ └── get_Files.md ├── Prompt │ ├── Append.md │ ├── Clear.md │ ├── Pop.md │ ├── Prepend.md │ ├── Push.md │ ├── README.md │ ├── Replace.md │ ├── Stringify.md │ ├── get_Current.md │ └── set_Current.md ├── README.md ├── RSS │ ├── Article │ │ ├── README.md │ │ ├── get_DatePublished.md │ │ └── get_Name.md │ ├── Feed │ │ ├── README.md │ │ ├── get_Article.md │ │ └── get_Recent.md │ └── FeedCollection │ │ ├── README.md │ │ ├── get_Feed.md │ │ ├── get_Random.md │ │ ├── get_Recent.md │ │ ├── get_RecentDuration.md │ │ └── set_RecentDuration.md ├── Recommendation │ ├── Install.md │ └── README.md ├── Stackable │ ├── Append.md │ ├── Clear.md │ ├── Pop.md │ ├── Prepend.md │ ├── Push.md │ ├── README.md │ ├── Replace.md │ ├── Stringify.md │ ├── get_Current.md │ └── set_Current.md ├── get_Errors.md ├── get_History.md ├── get_Host.md ├── get_Jobs.md ├── get_Modules.md ├── get_Process.md └── get_Runspace.md ├── README.md ├── System.Management.Automation.PSModuleInfo.LinkList.md ├── System.Management.Automation.PSModuleInfo.get_Demo.md ├── System.Management.Automation.PSModuleInfo.get_Discussion.md ├── System.Management.Automation.PSModuleInfo.get_Issue.md ├── System.Management.Automation.PSModuleInfo.get_Link.md ├── System.Management.Automation.PSModuleInfo.get_Logo.md ├── System.Management.Automation.PSModuleInfo.get_News.md ├── System.Management.Automation.PSModuleInfo.get_Preset.md ├── System.Management.Automation.PSModuleInfo.get_README.md ├── System.Management.Automation.PSModuleInfo.get_Recommendation.md ├── System.Management.Automation.PSModuleInfo.get_Screenshot.md ├── System.Management.Automation.PSModuleInfo.get_Test.md ├── System.Management.Automation.PSModuleInfo.get_Tip.md ├── System.Management.Automation.PSModuleInfo.get_Video.md ├── System.TimeZoneInfo.get_LocalTime.md ├── System ├── Management │ └── Automation │ │ └── PSModuleInfo │ │ ├── LinkList.md │ │ ├── README.md │ │ ├── get_Demo.md │ │ ├── get_Discussion.md │ │ ├── get_Issue.md │ │ ├── get_Link.md │ │ ├── get_Logo.md │ │ ├── get_ModuleProfile.md │ │ ├── get_ModuleProfiles.md │ │ ├── get_News.md │ │ ├── get_Presentation.md │ │ ├── get_Preset.md │ │ ├── get_README.md │ │ ├── get_Recommendation.md │ │ ├── get_Screenshot.md │ │ ├── get_Test.md │ │ ├── get_Tip.md │ │ └── get_Video.md └── TimeZoneInfo │ ├── README.md │ └── get_LocalTime.md ├── _config.yml └── contributing.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [StartAutomating] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FeatureRequest.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Request a Feature 3 | title: "Request - " 4 | labels: ["enhancement"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Tell us a little bit about what you'd like. 10 | - type: textarea 11 | id: Description 12 | attributes: 13 | label: Description 14 | description: Describe your dream feature. 15 | validations: 16 | required: true 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Formatting.yml: -------------------------------------------------------------------------------- 1 | name: Formatting 2 | description: Improve the Look and Feel of Posh 3 | title: "Formatting for " 4 | labels: ["enhancement"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Tell us a little bit about what you'd like. 10 | - type: textarea 11 | id: Description 12 | attributes: 13 | label: Description 14 | description: Describe what you'd like to see. 15 | validations: 16 | required: false 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/PoshFeed.yml: -------------------------------------------------------------------------------- 1 | name: Add PowerShell News Feed 2 | description: Ask for an RSS feed to be added to Posh 3 | title: "Tip: " 4 | labels: ["enhancement"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Tell us about the blog you want to add 10 | - type: textarea 11 | id: Links 12 | attributes: 13 | label: Links 14 | description: Provide one or more RSS urls 15 | validations: 16 | required: false 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/PoshTip.yml: -------------------------------------------------------------------------------- 1 | name: Add PowerShell Tip 2 | description: Add a PowerShell Tip or Trick 3 | title: "Tip: " 4 | labels: ["enhancement"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Tell us a bit about your example 10 | - type: textarea 11 | id: Example 12 | attributes: 13 | label: Example 14 | description: The example content. 15 | render: PowerShell 16 | validations: 17 | required: false 18 | - type: textarea 19 | id: Links 20 | attributes: 21 | label: Links 22 | description: Any related links. 23 | validations: 24 | required: false 25 | -------------------------------------------------------------------------------- /Assets/Get-Command-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Get-Command-In-Color.gif -------------------------------------------------------------------------------- /Assets/Get-Member-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Get-Member-In-Color.gif -------------------------------------------------------------------------------- /Assets/Improved-File-Formatting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Improved-File-Formatting.gif -------------------------------------------------------------------------------- /Assets/Posh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Posh.png -------------------------------------------------------------------------------- /Assets/Posh@1080p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Posh@1080p.png -------------------------------------------------------------------------------- /Assets/Reflection-Formatting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Reflection-Formatting.gif -------------------------------------------------------------------------------- /Assets/Regex-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/Regex-In-Color.gif -------------------------------------------------------------------------------- /Assets/XML-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/Assets/XML-In-Color.gif -------------------------------------------------------------------------------- /Build/Posh.GitHubWorkflow.PSDevOps.ps1: -------------------------------------------------------------------------------- 1 | #requires -Module Posh 2 | #requires -Module PSDevOps 3 | Import-BuildStep -SourcePath ( 4 | Join-Path $PSScriptRoot 'GitHub' 5 | ) -BuildSystem GitHubWorkflow 6 | 7 | Push-Location ($PSScriptRoot | Split-Path) 8 | New-GitHubWorkflow -Name "Build and Publish Posh" -On Demand, Push -Job TagReleaseAndPublish, 9 | TestPowerShellOnLinux, 10 | BuildPosh -OutputPath ( 11 | Join-Path $pwd .\.github\workflows\BuildAndPublishPosh.yml 12 | ) -Env @{ 13 | "AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social" 14 | "AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}' 15 | } 16 | 17 | Pop-Location -------------------------------------------------------------------------------- /Build/Posh.HelpOut.ps1: -------------------------------------------------------------------------------- 1 | $PoshLoaded = Get-Module Posh 2 | Push-Location ($PSScriptRoot | Split-Path) 3 | if (-not $PoshLoaded) { 4 | $PoshLoaded = Get-ChildItem -Recurse -Filter "*.psd1" | 5 | Where-Object Name -eq 'Posh.psd1' | 6 | Import-Module -Name { $_.FullName } -Force -PassThru 7 | } 8 | if ($PoshLoaded) { 9 | "::notice title=ModuleLoaded::Posh Loaded" | Out-Host 10 | } else { 11 | "::error:: Posh not loaded" |Out-Host 12 | } 13 | if ($PoshLoaded) { 14 | Save-MarkdownHelp -Module $PoshLoaded.Name -PassThru -SkipCommandType Alias 15 | } 16 | Pop-Location -------------------------------------------------------------------------------- /Build/Posh.Splatter.ps1: -------------------------------------------------------------------------------- 1 | Push-Location (Split-Path $PSScriptRoot) 2 | Initialize-Splatter -Verb Get, Use, Find, Merge -OutputPath .\@.ps1 3 | Pop-Location -------------------------------------------------------------------------------- /Formatting/FileHash.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Microsoft.PowerShell.Commands.FileHashInfo -GroupByProperty Algorithm -Property Hash, Path -AutoSize 2 | -------------------------------------------------------------------------------- /Formatting/FileSystem/FileSystemTypes.format.xml: -------------------------------------------------------------------------------- 1 |  2 | FileSystemTypes 3 | 4 | System.IO.DirectoryInfo 5 | System.IO.FileInfo 6 | 7 | -------------------------------------------------------------------------------- /Formatting/FileSystem/FileTreeView.view.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatTreeView -SelectionSet FileSystemTypes -Branch ([char]9500 + [char]9472 + [char]9472) -Property Name -HasChildren { 2 | if (-not $_.EnumerateFiles) { return $false } 3 | foreach ($f in $_.EnumerateFiles()) {$f;break} 4 | }, 5 | { 6 | if (-not $_.EnumerateDirectories) { return $false } 7 | foreach ($f in $_.EnumerateDirectories()) {$f;break} 8 | } -Children { 9 | $_.EnumerateFiles() 10 | }, { 11 | foreach ($d in $_.EnumerateDirectories()) { 12 | if ($d.Attributes -band 'Hidden') { continue } 13 | $d 14 | } 15 | } -------------------------------------------------------------------------------- /Formatting/PSEventArgs.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName System.Management.Automation.PSEventArgs -Property EventId, SourceId, Time, Sender, SourceArgs, MessageData -AlignProperty ([Ordered]@{ 2 | EventID = 'Right' 3 | SourceID = 'Left' 4 | Time = 'Center' 5 | Sender = 'Left' 6 | }) -VirtualProperty @{ 7 | EventID = { "" + $_.EventID + ' '} 8 | Time = { $_.Time.ToShortTimeString() } 9 | } -------------------------------------------------------------------------------- /Formatting/PSVariable.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName System.Management.Automation.PSVariable -Property Name, Value -StyleProperty @{ 2 | Name = { 3 | if ($_.Options -band 'ReadOnly' -or $_.Options -band 'Constant') { 4 | "Bold", "Foreground.Green" 5 | } 6 | } 7 | } -GroupLabel "ReadOnly / Constant Variables" -GroupByScript { 8 | "In $($psStyle.Foreground.Green;$psStyle.Bold)Bold Green$($psStyle.Foreground.Reset)" 9 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Host.Cursor.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Host.Cursor -Property "Position.Row", "Position.Column" -VirtualProperty @{ 2 | "Position.Row" = { $_.Position.Row } 3 | "Position.Column" = { $_.Position.Column } 4 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Host.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Host -Property Name, CurrentCulture, Width, Height -AutoSize -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Input.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Input -Action { 2 | Write-FormatViewExpression -ScriptBlock { 3 | Show-Markdown -InputObject $_.README 4 | } 5 | 6 | Write-FormatViewExpression -Newline 7 | 8 | Write-FormatViewExpression -Style 'Foreground.Cyan' -ScriptBlock { 9 | "To reset the input, use `$posh.Input.Clear()" 10 | } 11 | 12 | Write-FormatViewExpression -Newline 13 | Write-FormatViewExpression -Newline 14 | 15 | 16 | Write-FormatViewExpression -If { 17 | $_.Stack.Count 18 | } -ScriptBlock { 19 | ('The input has ' + $_.Stack.Count + ' modification(s)') 20 | } -Style 'Foreground.Yellow', 'Italic' 21 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Module.Link.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Module.Link -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_ } -ControlName Posh.Link 3 | } -GroupByProperty Source 4 | 5 | Write-FormatView -TypeName Posh.Module.Link -Property Name, Url -GroupByProperty Source -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Module.Screenshot.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Module.Screenshot -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_ } -ControlName Posh.Link 3 | } -GroupByProperty Source 4 | 5 | Write-FormatView -TypeName Posh.Module.Screenshot -Property Name, Url -GroupByProperty Source -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Module.Video.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Module.Video -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_ } -ControlName Posh.Link 3 | } -GroupByProperty Source 4 | 5 | Write-FormatView -TypeName Posh.Module.Video -Property Name, Url -GroupByProperty Source -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Parameters.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Parameters -Action { 2 | Write-FormatViewExpression -ScriptBlock { 3 | Show-Markdown -InputObject $_.README 4 | } 5 | 6 | Write-FormatViewExpression -Newline 7 | 8 | Write-FormatViewExpression -Style 'Foreground.Cyan' -ScriptBlock { 9 | "To add defaults, use `$posh.Parameters.SetDefault()" 10 | } 11 | 12 | Write-FormatViewExpression -Newline 13 | Write-FormatViewExpression -Newline 14 | 15 | 16 | Write-FormatViewExpression -ScriptBlock { 17 | Format-Yaml -InputObject ($_.Defaults) 18 | } -If { $global:PSDefaultParameterValues.Count } 19 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.PresetCollection.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Preset.Collection -Action { 2 | Write-FormatViewExpression -ScriptBlock { 3 | Show-Markdown -InputObject $_.README 4 | } 5 | 6 | Write-FormatViewExpression -Newline 7 | 8 | 9 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Prompt.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Prompt -Action { 2 | Write-FormatViewExpression -Style 'Foreground.Green', 'Bold' -ScriptBlock { 3 | Show-Markdown -InputObject $_.README 4 | } 5 | 6 | Write-FormatViewExpression -Newline 7 | 8 | Write-FormatViewExpression -Style 'Foreground.Cyan' -ScriptBlock { 9 | "To reset the prompt, use `$posh.Prompt.Clear()" 10 | } 11 | 12 | Write-FormatViewExpression -Newline 13 | Write-FormatViewExpression -Newline 14 | 15 | 16 | Write-FormatViewExpression -If { 17 | $_.Stack.Count 18 | } -ScriptBlock { 19 | ('The prompt has ' + $_.Stack.Count + ' modification(s)') 20 | } -Style 'Foreground.Yellow', 'Italic' 21 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.RSS.Article.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.RSS.Article -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_ } -ControlName Posh.Link 3 | Write-FormatViewExpression -If { $_.DatePublished -is [datetime] } -ScriptBlock { 4 | " ($($_.DatePublished.ToShortDateString())) " 5 | } 6 | Write-FormatViewExpression -If { $_.Enclosure } -ScriptBlock { $_ } -ControlName Posh.Link.Play 7 | 8 | } -GroupByProperty Source 9 | 10 | Write-FormatView -TypeName Posh.RSS.Article -Property Title, Link -------------------------------------------------------------------------------- /Formatting/Posh/Posh.RSS.Feed.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.RSS.Feed -GroupByProperty Name -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_.Recent } -ControlName Posh.Link.Line -Enumerate 3 | } 4 | 5 | Write-FormatView -TypeName Posh.RSS.Feed -GroupByProperty Name -Action { 6 | Write-FormatViewExpression -ScriptBlock { $_.Article } -ControlName Posh.Link.Line -Enumerate 7 | } -Name "All" -------------------------------------------------------------------------------- /Formatting/Posh/Posh.RSS.FeedCollection.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.RSS.FeedCollection -Action { 2 | Write-FormatViewExpression -ScriptBlock { 3 | Show-Markdown -InputObject $_.README 4 | } 5 | 6 | Write-FormatViewExpression -Newline 7 | 8 | Write-FormatViewExpression -Style 'Foreground.Cyan' -ScriptBlock { 9 | @( 10 | "Feeds: " 11 | "" 12 | foreach ($feed in $_.All) { 13 | "* $($feed.Name)" 14 | } 15 | ) -join [Environment]::NewLine 16 | } 17 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Tip.Collection.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Tip.Collection -Action { 2 | Write-FormatViewExpression -Property Random -ControlName Posh.Tip.Control 3 | } -------------------------------------------------------------------------------- /Formatting/Posh/Posh.Tip.Command.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Posh.Tip.Command -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_ } -ControlName Posh.Tip.Control 3 | } 4 | 5 | Write-FormatView -TypeName n/a -Name Posh.Tip.Control -AsControl -Action { 6 | Write-FormatViewExpression -ScriptBlock { 7 | $showDemoCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand('Show-Demo', 'Function') 8 | if ($showDemoCommand -and $_.Content -is [scriptblock]) { 9 | Show-Demo -DemoScript $_.Content -AutoPlay | Out-Null 10 | } else { 11 | $_.Content 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Formatting/Reflection/System.Reflection.MemberInfo.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName System.Reflection.MemberInfo -Action { 2 | Write-FormatViewExpression -If { $ExecutionContext.SessionState.PSVariable.Set('Script:DisplayingMember',$true) } -ScriptBlock { $null } 3 | Write-FormatViewExpression -ControlName TypeMemberControl -ScriptBlock { $_ } 4 | Write-FormatViewExpression -If { $ExecutionContext.SessionState.PSVariable.Remove('Script:DisplayingMember') } -ScriptBlock { $null } 5 | } 6 | -------------------------------------------------------------------------------- /Formatting/Reflection/TypeBaseControl.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -Action { 2 | Write-FormatViewExpression -Newline 3 | Write-FormatViewExpression -ScriptBlock { ' *' } 4 | Write-FormatViewExpression -ControlName TypeNameControl -ScriptBlock {$_ } -Style 'Foreground.Cyan', 'Bold' 5 | } -TypeName TypeBase -Name TypeBase -AsControl 6 | -------------------------------------------------------------------------------- /Formatting/Reflection/TypeConstructorsControl.format.ps1: -------------------------------------------------------------------------------- 1 | $getConstructors = { 2 | if ($_ -is [Type]) { 3 | $_.GetConstructors('Instance,Public') 4 | } elseif ($_.Type -and $_.BindingFlags) { 5 | $_.Type.GetConstructors($_.BindingFlags) 6 | } 7 | } 8 | Write-FormatControl -Name TypeConstructorsControl -Action { 9 | Write-FormatViewExpression -If $getConstructors -ScriptBlock { 10 | [Environment]::NewLine + ('#' * 3) + ' Constructors:' 11 | } 12 | Write-FormatViewExpression -If $getConstructors -ScriptBlock $getConstructors -Enumerate -ControlName TypeMethodControl 13 | } -------------------------------------------------------------------------------- /Formatting/Reflection/TypeEventsControl.format.ps1: -------------------------------------------------------------------------------- 1 | $getEvents = { 2 | if ($_ -is [Type]) { 3 | $_.GetEvents('Instance,Public') 4 | } elseif ($_.Type -and $_.BindingFlags) { 5 | $_.Type.GetEvents($_.BindingFlags) 6 | } 7 | } 8 | 9 | Write-FormatControl -Name TypeEventsControl -Action { 10 | Write-FormatViewExpression -If $getEvents -ScriptBlock { 11 | [Environment]::NewLine + ('#' * 3) + ' Events:' 12 | } 13 | Write-FormatViewExpression -If $getEvents -ScriptBlock $getEvents -Enumerate -ControlName TypeEventControl 14 | } -------------------------------------------------------------------------------- /Formatting/Reflection/TypeFieldControl.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatControl -Name TypeFieldControl -Action { 2 | Write-FormatViewExpression -If { -not $script:DisplayingMember } -ScriptBlock { [Environment]::NewLine } 3 | Write-FormatViewExpression -ScriptBlock { ' * '} 4 | Write-FormatViewExpression -Property FieldType -ControlName TypeNameControl -Style 'Foreground.Cyan', 'Bold' 5 | Write-FormatViewExpression -Property Name -Style 'Formatting.Warning' 6 | } -------------------------------------------------------------------------------- /Formatting/Reflection/TypeInterfaceControl.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -Action { 2 | Write-FormatViewExpression -Newline 3 | Write-FormatViewExpression -ScriptBlock { ' *' } 4 | Write-FormatViewExpression -ControlName TypeNameControl -ScriptBlock {$_ } -Style 'Foreground.Cyan', 'Bold' 5 | } -TypeName n/a -Name TypeInterfaceControl -AsControl 6 | -------------------------------------------------------------------------------- /Formatting/Reflection/TypeMethodParameterControl.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -Action { 2 | Write-FormatViewExpression -If { $_.N -gt 0} -ScriptBlock { ', ' } 3 | Write-FormatViewExpression -Property ParameterType -ControlName TypeNameControl -Style 'Foreground.Cyan','Bold' 4 | Write-FormatViewExpression -ScriptBlock { '$' + $_.Name + ' ' } -Style 'Formatting.Warning' -If {$_.Name } 5 | } -TypeName TypeMethodParameterControl -Name TypeMethodParameterControl -AsControl 6 | -------------------------------------------------------------------------------- /Formatting/Reflection/TypeNameControl.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -AsControl -Name TypeNameControl -Action { 2 | Write-FormatViewExpression -Text ' [' 3 | Write-FormatViewExpression -ScriptBlock { 4 | if ($_.FullName) { 5 | $_.Fullname -replace '`.+', '' -replace '^System\.', '' 6 | } else { 7 | $_.Name -replace '`.+', '' -replace '^System\.', '' 8 | } 9 | } 10 | 11 | Write-FormatViewExpression -If { 12 | $_.IsGenericType 13 | } -ControlName TypeNameControl -ScriptBlock { 14 | $_.GenericTypeArguments 15 | } -Enumerate 16 | Write-FormatViewExpression -Text ']' 17 | } -TypeName TypeNameControl -------------------------------------------------------------------------------- /Formatting/Reflection/TypePropertyControl.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -Action { 2 | Write-FormatViewExpression -If { -not $script:DisplayingMember } -ScriptBlock { [Environment]::NewLine } 3 | Write-FormatViewExpression -ScriptBlock { ' * '} 4 | Write-FormatViewExpression -Property PropertyType -ControlName TypeNameControl -Style 'Foreground.Cyan','Bold' 5 | Write-FormatViewExpression -Property Name -Style 'Formatting.Warning' 6 | Write-FormatViewExpression -ScriptBlock { 7 | ' {' + 8 | $(if ($_.CanRead) {'get;'}) + 9 | $(if ($_.CanWrite) {'set;'})+ 10 | '}' 11 | } 12 | } -TypeName TypePropertyControl -Name TypePropertyControl -AsControl 13 | -------------------------------------------------------------------------------- /Formatting/RegEx/Match.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName System.Text.RegularExpressions.Match -Property Index, Length, Value -Wrap -AutoSize -------------------------------------------------------------------------------- /Formatting/Service.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -Type System.ServiceProcess.ServiceController -Property Status, Name, DisplayName -StyleProperty @{ 2 | Status = { 3 | switch ($_.Status) { 4 | Stopped { 5 | 'Formatting.Warning' 6 | } 7 | Running { 8 | 'Foreground.Green','Bold' 9 | } 10 | default { 11 | 'Formatting.Error' 12 | } 13 | } 14 | } 15 | } -AutoSize -------------------------------------------------------------------------------- /Formatting/System.Version.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName System.Version -Action { 2 | Write-FormatViewExpression -ScriptBlock { $_ } -ControlName VersionControl 3 | } -------------------------------------------------------------------------------- /Formatting/TimeZone.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName System.TimeZoneInfo -Property ID, LocalTime, DisplayName -AutoSize -AlignProperty @{ 2 | ID = 'Right' 3 | LocalTime = 'Center' 4 | DisplayName = 'Left' 5 | } -VirtualProperty @{ 6 | LocalTime = { 7 | ' ' + $_.LocalTime.ToShortTimeString() + ' ' 8 | } 9 | } -StyleRow { 10 | if ($_.LocalTime.Hour -lt 6 -or $_.LocalTime.Hour -gt 18) { 11 | 'Foreground.Blue','Italic' 12 | } 13 | else { 14 | 'Foreground.Yellow','Bold' 15 | } 16 | } -------------------------------------------------------------------------------- /Formatting/XML/SelectXmlInfo.format.ps1: -------------------------------------------------------------------------------- 1 | Write-FormatView -TypeName Microsoft.PowerShell.Commands.SelectXmlInfo -Property Node, Pattern -GroupByProperty "Path" -------------------------------------------------------------------------------- /Formatting/XML/XmlDocument.view.ps1: -------------------------------------------------------------------------------- 1 | [OutputType([xml])] 2 | param() 3 | 4 | Write-FormatViewExpression -If {$script:TreeDepth = 0;$true} -ControlName XmlNodeControl -ScriptBlock { 5 | @(foreach ($cn in $_.ChildNodes) { 6 | if ($cn -is [xml.xmldeclaration]) { continue } 7 | $cn 8 | }) 9 | } -Enumerate 10 | Write-FormatViewExpression -If {$ExecutionContext.SessionState.PSVariable.Remove('script:TreeDepth'); $false} -ScriptBlock { $null } 11 | -------------------------------------------------------------------------------- /TipsAndTricks/AddingHashtables.Tip.ps1: -------------------------------------------------------------------------------- 1 | # You can add two hashtables together in PowerShell 2 | @{a='b'} + @{c='d'} 3 | -------------------------------------------------------------------------------- /TipsAndTricks/AssigningIfStatements.Tip.ps1: -------------------------------------------------------------------------------- 1 | # In PowerShell, you can assign the results of any expression. 2 | 3 | # Including an `if`! 4 | 5 | $IsFriday = 6 | if ([DateTime]::now.DayOfWeek -as [int] -eq 5) { 7 | $true 8 | } 9 | 10 | $IsFriday -------------------------------------------------------------------------------- /TipsAndTricks/AssigningLoopOutput.Tip.ps1: -------------------------------------------------------------------------------- 1 | # You can assign the output of a loop in PowerShell 2 | 3 | $OddNumbers = 4 | foreach ($n in 1..100) { 5 | if ($n % 2) { 6 | $n 7 | } 8 | } 9 | 10 | $OddNumbers 11 | -------------------------------------------------------------------------------- /TipsAndTricks/CreatingPsuedoObjects.Trick.ps1: -------------------------------------------------------------------------------- 1 | # You can make psuedoobjects out of thin air! 2 | 3 | [PSCustomObject][Ordered]@{ 4 | Name = "James" 5 | } -------------------------------------------------------------------------------- /TipsAndTricks/EverythingIsAnObject.Tip.ps1: -------------------------------------------------------------------------------- 1 | # Everything is an object in PowerShell. 2 | 3 | "Everything is an object in PowerShell" | Get-Member -------------------------------------------------------------------------------- /TipsAndTricks/GenericTypes.Tip.ps1: -------------------------------------------------------------------------------- 1 | # You can use generic types in PowerShell. 2 | 3 | # Just include inner types in inner brackets 4 | [Collections.Generic.List[BigInt]]::new( 5 | [BigInt[]]@(0,1) 6 | ) 7 | 8 | # Whitespace does not matter too much. 9 | [Collections.Generic.Dictionary[ 10 | string, 11 | PSObject 12 | ]]::new() + @{a='b'} -------------------------------------------------------------------------------- /TipsAndTricks/LoopLabels.Tip.ps1: -------------------------------------------------------------------------------- 1 | # Loops can have labels! 2 | 3 | :GameLoop do { 4 | if ($Game.Playing) { 5 | continue GameLoop 6 | } 7 | } while ($false) 8 | 9 | # This makes it easier to control when a loop exits. 10 | 11 | -------------------------------------------------------------------------------- /TipsAndTricks/MultipleAssignment.Tip.ps1: -------------------------------------------------------------------------------- 1 | # You can assign multiple variables in one assignment 2 | $one, $two = 1,2 3 | 4 | -------------------------------------------------------------------------------- /TipsAndTricks/NegativeIndexing.Tip.ps1: -------------------------------------------------------------------------------- 1 | # Collections that take an integer index can be negative indexed. 2 | 3 | # This will look backwards thru a collection 4 | @(1..100)[-2] -------------------------------------------------------------------------------- /TipsAndTricks/NegativeIndexingFibonacci.Trick.ps1: -------------------------------------------------------------------------------- 1 | # People spend so much time demonstrating Fibonacci recursively 2 | # Let's show how we can do this iteratively with negative indexing 3 | & { 4 | param( 5 | [ValidateRange(0,2kb)] 6 | $FibonacciNumber 7 | ) 8 | 9 | $FibonacciSequenece = [Collections.Generic.List[BigInt]]::new([BigInt[]]@(0,1)) 10 | 11 | do { 12 | $FibonacciSequenece.Add( 13 | $FibonacciSequenece[-1] + $FibonacciSequenece[-2] 14 | ) 15 | } while ($FibonacciSequenece.Count -lt $FibonacciNumber) 16 | $FibonacciSequenece 17 | 18 | } -FibonacciNumber 17 -------------------------------------------------------------------------------- /TipsAndTricks/OrderedHashtables.Tip.ps1: -------------------------------------------------------------------------------- 1 | # PowerShell hashtables are not always stored in the order they are declared. 2 | @{ 3 | MaybeFirstKey = 1 4 | MaybeSecondKey = 2 5 | MaybeThirdKey = 3 6 | } 7 | 8 | # If you want to ensure the order of hashtables, cast them to [Ordered] 9 | [Ordered]@{ 10 | FirstKey = 1 11 | SecondKey = 2 12 | ThirdKey = 3 13 | } 14 | -------------------------------------------------------------------------------- /TipsAndTricks/RangeOperator.Tip.ps1: -------------------------------------------------------------------------------- 1 | # PowerShell has a range operator 2 | 3 | 1..10 4 | 5 | # Ranges can be variables or expressions 6 | (Get-Random -Min 1 -Max 10)..(Get-Random -Min 1 -Max 10) 7 | 8 | # You can also use ranges to index. 9 | @(1..10)[0..4] -------------------------------------------------------------------------------- /TipsAndTricks/TernaryOperator.Tip.ps1: -------------------------------------------------------------------------------- 1 | # In PowerShell 7, there's a ternary operator. 2 | 3 | # Let's use it to toss a coin 4 | 5 | $CoinToss = (Get-Random) % 2 ? 'Heads' : 'Tails' 6 | 7 | $CoinToss -------------------------------------------------------------------------------- /TipsAndTricks/TheParameterSetThatWasNotThere.Trick.ps1: -------------------------------------------------------------------------------- 1 | # Parameter Sets are more powerful than you think: 2 | 3 | # You can use "The Parameter Set That Wasn't There" to allow a command to be called with no parameters 4 | 5 | # (and to know when that happens) 6 | 7 | & { 8 | [CmdletBinding(DefaultParameterSetName="NoParameters")] 9 | param( 10 | [Parameter(Mandatory,ParameterSetName="SomeParameters")] 11 | $SomeParameter 12 | ) 13 | 14 | $PSCmdlet.ParameterSetName 15 | } 16 | -------------------------------------------------------------------------------- /TipsAndTricks/TrinityOfDiscoverability.Tip.ps1: -------------------------------------------------------------------------------- 1 | # Whenever you need to find your way around PowerShell, remember the trinity of discoverability 2 | 3 | # Get-Command helps you find commands 4 | 5 | Get-Command -Module Microsoft.PowerShell.* 6 | 7 | # Get-Help gives you help about commands 8 | 9 | Get-Help Get-Help 10 | 11 | # Get-Member tells you what an object can do: 12 | 13 | Get-Command | Get-Member 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /TipsAndTricks/YouCanGetHelpOnAScript.Tip.ps1: -------------------------------------------------------------------------------- 1 | # Get-Help isn't just got commands. 2 | 3 | # You can Get-Help on any Script, too. 4 | 5 | $scriptPath = 6 | Get-Module Posh | 7 | Split-Path | 8 | Join-Path -ChildPath "Types" | 9 | Join-Path -ChildPath "PSModuleInfo" | 10 | Join-Path -ChildPath "get_Tip.ps1" 11 | 12 | Get-Help $scriptPath 13 | -------------------------------------------------------------------------------- /Types/PSEventArgs/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | EventID = 'EventIdentifier' 3 | SourceID = 'SourceIdentifier' 4 | Time = 'TimeGenerated' 5 | } -------------------------------------------------------------------------------- /Types/PSEventArgs/PSTypeName.txt: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSEventArgs -------------------------------------------------------------------------------- /Types/PSModuleInfo/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Recommendations = 'Recommendation' 3 | Screenshots = 'Screenshot' 4 | Videos = 'Video' 5 | Demos = 'Demo' 6 | Tests = 'Test' 7 | Tips = 'Tip' 8 | Trick = 'Tip' 9 | Tricks = 'Tip' 10 | Links = 'Link' 11 | Resource = 'Link' 12 | Resources = 'Link' 13 | Presets = 'Preset' 14 | RSS = 'News' 15 | Feed = 'News' 16 | Discussions = 'Discussion' 17 | Issues = 'Issue' 18 | } -------------------------------------------------------------------------------- /Types/PSModuleInfo/PSTypeName.txt: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Demo.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets module demos 4 | .DESCRIPTION 5 | Gets demo files related to a module. 6 | .EXAMPLE 7 | $Posh.Demos 8 | .LINK 9 | https://github.com/StartAutomating/ShowDemo 10 | #> 11 | $this | 12 | Split-Path | 13 | Get-ChildItem -Recurse -Filter *.demo.ps1 | 14 | Select-Object -Unique -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Discussion.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets a module's discussions URL. 4 | .DESCRIPTION 5 | Gets the discussions URL related to a module. 6 | .NOTES 7 | The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing. 8 | #> 9 | if ($this.ProjectURI.Host -eq 'github.com') { 10 | [PSCustomObject][Ordered]@{ 11 | Name = "$($this.Name) Discussions" 12 | Url = "$($this.ProjectURI)/discussions" 13 | PSTypeName = 'Posh.Module.Link' 14 | } 15 | } -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Issue.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets a module's issue URL. 4 | .DESCRIPTION 5 | Gets the issues URL related to a module. 6 | .NOTES 7 | The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing. 8 | #> 9 | if ($this.ProjectURI.Host -eq 'github.com') { 10 | [PSCustomObject][Ordered]@{ 11 | Name = "$($this.Name) Issues" 12 | Url = "$($this.ProjectURI)/issues" 13 | PSTypeName = 'Posh.Module.Link' 14 | } 15 | } -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Link.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Module Links 4 | .DESCRIPTION 5 | Lists hyperlinks from this module. 6 | .EXAMPLE 7 | $posh.Links 8 | #> 9 | $this.LinkList(@( 10 | $this.PrivateData.Link 11 | $this.PrivateData.Links 12 | $this.PrivateData.Resource 13 | $this.PrivateData.Resources 14 | $this.PrivateData.PSData.Link 15 | $this.PrivateData.PSData.Links 16 | $this.PrivateData.PSData.Resource 17 | $this.PrivateData.PSData.Resources 18 | ), "Posh.Module.Link") 19 | 20 | -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Logo.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Module Logos 4 | .DESCRIPTION 5 | Lists logos for this module. 6 | .EXAMPLE 7 | $posh.Logos 8 | #> 9 | $this.LinkList(@( 10 | $this.PrivateData.Logo 11 | $this.PrivateData.Logos 12 | $this.PrivateData.PSData.Logo 13 | $this.PrivateData.PSData.Logos 14 | $this.PrivateData.PSData.IconURI 15 | ), "Posh.Module.Logo") 16 | 17 | -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_ModuleProfile.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets a Module's Profile 4 | .DESCRIPTION 5 | Gets the profile file associated with the module. 6 | 7 | Any module can have a file within the same directory as $profile, named `$($this.Name).profile.ps1`. 8 | 9 | This file may be loaded when the module loads, or anytime thereafter. 10 | #> 11 | if (-not $profile) { return ''} 12 | ($profile | 13 | Split-Path | 14 | Join-Path -ChildPath "$($this.Name).profile.ps1" 15 | ).ToString() -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Presentation.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets module presentations 4 | .DESCRIPTION 5 | Gets PowerPoint presentations and templates located within a PowerShell module. 6 | #> 7 | $this | 8 | Split-Path | 9 | Get-ChildItem -Recurse | 10 | Where-Object Extension -In '.pptx', '.potx','.ppt' | 11 | Select-Object -Unique -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_README.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets a Module's README 4 | .DESCRIPTION 5 | Gets the content of README.md file located at the module root. 6 | #> 7 | if ($this.'.README') { 8 | return $this.'.README' 9 | } 10 | 11 | $readmeFileExists = $this | 12 | Split-Path | 13 | Get-ChildItem | 14 | Where-Object Name -eq 'README.md' 15 | 16 | if ($readmeFileExists) { 17 | $this | 18 | Add-Member NoteProperty '.README' -Force (Get-Content -Raw $readmeFileExists) 19 | 20 | return $this.'.README' 21 | } -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Screenshot.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Module Screenshots 4 | .DESCRIPTION 5 | Lists screenshots from this module. 6 | .EXAMPLE 7 | $posh.Screenshots 8 | #> 9 | $this.LinkList(@( 10 | $this.PrivateData.Screenshot 11 | $this.PrivateData.Screenshots 12 | $this.PrivateData.PSData.Screenshot 13 | $this.PrivateData.PSData.Screenshots 14 | ), "Posh.Module.Screenshot") 15 | 16 | -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Test.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets module tests 4 | .DESCRIPTION 5 | Gets Pester Tests located within a module. 6 | #> 7 | $this | 8 | Split-Path | 9 | Get-ChildItem -Recurse -Filter *.tests.ps1 | 10 | Select-Object -Unique -------------------------------------------------------------------------------- /Types/PSModuleInfo/get_Video.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Module Videos 4 | .DESCRIPTION 5 | Lists videos about this module. 6 | .EXAMPLE 7 | $posh.Videos 8 | #> 9 | $this.LinkList(@( 10 | $this.PrivateData.Video 11 | $this.PrivateData.Videos 12 | $this.PrivateData.PSData.Video 13 | $this.PrivateData.PSData.Videos 14 | ), "Posh.Module.Video") 15 | 16 | -------------------------------------------------------------------------------- /Types/Posh.Commands/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Functions = 'Function' 3 | Cmdlets = 'Cmdlet' 4 | Aliases = 'Alias' 5 | Applications = 'Application' 6 | } -------------------------------------------------------------------------------- /Types/Posh.Commands/DefaultDisplay.txt: -------------------------------------------------------------------------------- 1 | Count 2 | AliasCount 3 | ApplicationCount 4 | CmdletCount 5 | FunctionCount -------------------------------------------------------------------------------- /Types/Posh.Commands/get_AliasCount.ps1: -------------------------------------------------------------------------------- 1 | @($this.Alias).Count -------------------------------------------------------------------------------- /Types/Posh.Commands/get_ApplicationCount.ps1: -------------------------------------------------------------------------------- 1 | @($this.Application).Count -------------------------------------------------------------------------------- /Types/Posh.Commands/get_CmdletCount.ps1: -------------------------------------------------------------------------------- 1 | @($this.Alias).Count -------------------------------------------------------------------------------- /Types/Posh.Commands/get_Count.ps1: -------------------------------------------------------------------------------- 1 | @($this.All).Count -------------------------------------------------------------------------------- /Types/Posh.Commands/get_Extended.ps1: -------------------------------------------------------------------------------- 1 | $this.FindExtensions() 2 | -------------------------------------------------------------------------------- /Types/Posh.Commands/get_FunctionCount.ps1: -------------------------------------------------------------------------------- 1 | @($this.Function).Count -------------------------------------------------------------------------------- /Types/Posh.Errors/LineLike.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Filters errors by line wildcard 4 | .DESCRIPTION 5 | Filters entries in $Error for items that a .Line like a wildcard. 6 | .EXAMPLE 7 | $error.LineLike("Get-*") 8 | #> 9 | param( 10 | # A wildcard pattern. 11 | [string] 12 | $Like 13 | ) 14 | 15 | ,@(foreach ($err in $this) { 16 | if ($err.InvocationInfo.Line -like $Like) { 17 | $err 18 | } 19 | }) -------------------------------------------------------------------------------- /Types/Posh.Errors/LineMatch.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Filters errors by command pattern 4 | .DESCRIPTION 5 | Filters entries in $Error for items that have a .CommandLine matching the pattern. 6 | .EXAMPLE 7 | $error.LineMatc("^Get") 8 | #> 9 | param( 10 | # A regular expression. 11 | $Match 12 | ) 13 | 14 | ,@(foreach ($err in $this) { 15 | if ($err.InvocationInfo.Line -match $match) { 16 | $err 17 | } 18 | }) -------------------------------------------------------------------------------- /Types/Posh.Errors/get_ByLine.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets errors by line 4 | .DESCRIPTION 5 | Gets all lines that produced errors 6 | .EXAMPLE 7 | $error.ByLine 8 | #> 9 | $errorsByLine = 10 | [Collections.Generic.Dictionary[ 11 | string, 12 | [Collections.Generic.List[psobject]] 13 | ]]::new([System.StringComparer]::OrdinalIgnoreCase) 14 | 15 | 16 | foreach ($err in $this) { 17 | 18 | $errLine = $err.InvocationInfo.Line 19 | if (-not $errLine) { continue } 20 | if (-not $errorsByLine[$errLine]) { 21 | $errorsByLine[$errLine] = [Collections.Generic.List[psobject]]::new() 22 | } 23 | $null = $errorsByLine[$errLine].Add($err) 24 | } 25 | $errorsByLine 26 | -------------------------------------------------------------------------------- /Types/Posh.Errors/get_History.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Error History 4 | .DESCRIPTION 5 | Gets the history items associated with PowerShell Errors 6 | .EXAMPLE 7 | $Error.History 8 | #> 9 | $historyIDS = @(foreach ($err in $this) { 10 | if ($err.InvocationInfo.HistoryId -gt 0) { 11 | $err.InvocationInfo.HistoryId 12 | } 13 | }) 14 | 15 | Get-History -Id $historyIDS -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/Posh.Preset.Collection/README.md: -------------------------------------------------------------------------------- 1 | ## Posh Presets 2 | 3 | Posh Presets provide a way to store and apply presets for a variable. 4 | 5 | They are simply data files, where each key or property repesents a expression and it's value represents what it will be set to. 6 | 7 | Preset files can be .psd1, .json, or .clixml. 8 | 9 | To see what presets can do, use $Posh.Presets | Get-Member -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/Refresh.ps1: -------------------------------------------------------------------------------- 1 | $this | Add-Member NoteProperty '.Cache' @() -Force -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/get_CommandType.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets an extension collection's CommandType 4 | .DESCRIPTION 5 | Gets the extended CommandTypes(s) that are stored in an extension collection. 6 | 7 | CommandTypes can be defined in a module's manifest. 8 | #> 9 | return $this.'.CommandType' -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/get_Count.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the extension count. 4 | .DESCRIPTION 5 | Gets the count of all extensions in a collection. 6 | #> 7 | $this.All.Length -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/get_Module.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets an extension collection's module 4 | .DESCRIPTION 5 | Gets the module that defines extended types in an extension collection. 6 | #> 7 | return $this.'.Module' -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/get_Path.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets an extension collection's Path 4 | .DESCRIPTION 5 | Gets the Path(s) that store extensions in an extension collection. 6 | #> 7 | return $this.'.Path' -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/get_Random.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets a random extended command 4 | .DESCRIPTION 5 | Gets a random extended command from an ExtensionCollection. 6 | #> 7 | $this.All | Get-Random -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/set_CommandType.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Sets an extension collection's command type 4 | .DESCRIPTION 5 | Sets the extended command types in an extension collection. 6 | #> 7 | param( 8 | # The path. If this is empty all extended commands will be present in the collection 9 | [string[]] 10 | $CommandType 11 | ) 12 | 13 | Add-Member -InputObject $this -MemberType NoteProperty -Name '.CommandType' -Value $CommandType -Force -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/set_Module.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Sets an extension collection's module 4 | .DESCRIPTION 5 | Sets the module that defines extended command types in an extension collection. 6 | #> 7 | param( 8 | # The module. 9 | [Management.Automation.PSModuleInfo] 10 | $Module 11 | ) 12 | 13 | Add-Member -InputObject $this -MemberType NoteProperty -Name '.Module' -Value $module -Force -------------------------------------------------------------------------------- /Types/Posh.ExtensionCollection/set_Path.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Sets an extension collection's path 4 | .DESCRIPTION 5 | Sets the path that defines extended command types in an extension collection. 6 | #> 7 | param( 8 | # The path. If this is empty, only extensions that are functions or aliases will be found. 9 | [string[]] 10 | $Path 11 | ) 12 | 13 | Add-Member -InputObject $this -MemberType NoteProperty -Name '.Path' -Value $Path -Force -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Left = "Back" # Not _technically_ true if you're on a .RightToLeft culture. Sorry. 3 | Right = "Forward" # Not _technically_ true if you're on a .RightToLeft culture. Sorry. 4 | } -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Back.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Moves the cursor back 4 | .DESCRIPTION 5 | Moves the cursor N (default 1) cells back. 6 | If the cursor is already at the edge of the screen, this has no effect. 7 | .NOTES 8 | This method returns an escape sequence (it should be invisible). 9 | #> 10 | param( 11 | # How far the cursor should move. 12 | [Alias('N')] 13 | [ValidateRange(1,1024)] 14 | [int]$Distance = 1 15 | ) 16 | 17 | "`e[${Distance}D" 18 | 19 | 20 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Down.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Moves the cursor down 4 | .DESCRIPTION 5 | Moves the cursor N (default 1) cells down. 6 | If the cursor is already at the edge of the screen, this has no effect. 7 | .NOTES 8 | This method returns an escape sequence (it should be invisible). 9 | #> 10 | param( 11 | # How far the cursor should move 12 | [ValidateRange(1,1024)] 13 | [int]$Distance = 1 14 | ) 15 | 16 | "`e[${Distance}B" 17 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Forward.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Moves the cursor forward 4 | .DESCRIPTION 5 | Moves the cursor N (default 1) cells back. 6 | If the cursor is already at the edge of the screen, this has no effect. 7 | .NOTES 8 | This method returns an escape sequence (it should be invisible). 9 | #> 10 | param( 11 | # How far the cursor should move 12 | [Alias('N')] 13 | [ValidateRange(1,1024)] 14 | [int]$Distance = 1 15 | ) 16 | 17 | "`e[${Distance}C" 18 | 19 | 20 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Hide.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Hides the cursor 4 | .DESCRIPTION 5 | Hides the cursor. This is not supported in all terminals. 6 | .NOTES 7 | This method returns an escape sequence (it should be invisible). 8 | #> 9 | param() 10 | 11 | "`e[25l" 12 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/PageDown.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Pages the cursor down 4 | .DESCRIPTION 5 | Pages the cursor N (default 1) pages down. New lines are added at the top. 6 | .NOTES 7 | This method returns an escape sequence (it should be invisible). 8 | #> 9 | param( 10 | # How far the cursor should move 11 | [Alias('Rows')] 12 | [ValidateRange(1,1024)] 13 | [int]$Distance = 1 14 | ) 15 | 16 | [Console]::Write("`e[${Distance}T") 17 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/PageUp.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Pages the cursor up. 4 | .DESCRIPTION 5 | Pages the cursor N (default 1) pages up. New lines are added at the bottom. 6 | .NOTES 7 | This method returns an escape sequence (it should be invisible). 8 | #> 9 | param( 10 | # How far the cursor should move 11 | [Alias('Rows')] 12 | [ValidateRange(1,1024)] 13 | [int]$Distance = 1 14 | ) 15 | 16 | [Console]::Write("`e[${Distance}S") 17 | 18 | 19 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Show.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Shows the cursor 4 | .DESCRIPTION 5 | Shows the cursor. This is not supported in all terminals. 6 | .NOTES 7 | This method returns an escape sequence (it should be invisible). 8 | #> 9 | param() 10 | 11 | "`e[25h" 12 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/Up.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Moves the cursor up 4 | .DESCRIPTION 5 | Moves the cursor N (default 1) cells up. 6 | If the cursor is already at the edge of the screen, this has no effect. 7 | #> 8 | param( 9 | # How far the cursor should move 10 | [Alias('N')] 11 | [ValidateRange(1,1024)] 12 | [int]$Distance = 1 13 | ) 14 | 15 | "`e[${Distance}A" 16 | 17 | 18 | -------------------------------------------------------------------------------- /Types/Posh.Host.Cursor/get_Position.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the cursor position 4 | .DESCRIPTION 5 | Gets the cursor position 6 | .EXAMPLE 7 | $Host.Cursor.Position 8 | #> 9 | 10 | if ($host.UI.RawUI.CursorPosition) { 11 | # In the "really" category, CursorPosition is zero-index, where as actual cursors in a terminal are 1-indexed. 12 | [PSCustomObject][Ordered]@{ 13 | PSTypeName = 'Posh.Host.Cursor.Position' 14 | Row = ($host.UI.RawUI.CursorPosition.Y + 1) 15 | Column = ($host.UI.RawUI.CursorPosition.X + 1) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Types/Posh.Host/get_Cursor.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the cursor 4 | .DESCRIPTION 5 | Gets the console cursor. 6 | .EXAMPLE 7 | $Host.Cursor 8 | .EXAMPLE 9 | $Posh.Host.Cursor 10 | .EXAMPLE 11 | $Posh.Cursor.Position 12 | #> 13 | return ([PSCustomObject]@{PSTypeName='Posh.Host.Cursor'}) -------------------------------------------------------------------------------- /Types/Posh.Host/get_Height.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the height of the host 4 | .DESCRIPTION 5 | Gets the height of the host (in characters). 6 | .EXAMPLE 7 | $posh.Host.Height 8 | .EXAMPLE 9 | $Host.Height 10 | #> 11 | $this.UI.RawUI.BufferSize.Height -------------------------------------------------------------------------------- /Types/Posh.Host/get_Title.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the host's title 4 | .DESCRIPTION 5 | Gets the host's window title. 6 | .EXAMPLE 7 | $Posh.Title 8 | #> 9 | $this.UI.RawUI.WindowTitle 10 | -------------------------------------------------------------------------------- /Types/Posh.Host/get_Width.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the Width of the host 4 | .DESCRIPTION 5 | Gets the Width of the host (in characters). 6 | .EXAMPLE 7 | $posh.Host.Width 8 | .EXAMPLE 9 | $Host.Width 10 | #> 11 | $this.UI.RawUI.BufferSize.Width -------------------------------------------------------------------------------- /Types/Posh.Host/set_Title.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Sets the host's title 4 | .DESCRIPTION 5 | Sets the host's window title. 6 | 7 | Unfortunately, this will be ignored if running in Visual Studio Code. 8 | .EXAMPLE 9 | $Posh.Title = "Sup?" 10 | #> 11 | param( 12 | [string] 13 | $Title 14 | ) 15 | $this.UI.RawUI.WindowTitle = $title 16 | -------------------------------------------------------------------------------- /Types/Posh.NET/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Abstracts = "Abstract" 3 | Assemblies = "Assembly" 4 | Attributes = "Attribute" 5 | Alias = "TypeAccelerator" 6 | Aliases = "TypeAccelerator" 7 | Enums = "Enum" 8 | Exceptions = "Exception" 9 | ExtensionTypes = "ExtensionType" 10 | Cmdlets = "Cmdlet" 11 | Generics = "Generic" 12 | Delegates = "Delegate" 13 | Interfaces = "Interface" 14 | Types = "Type" 15 | TypeAccelerators = "TypeAccelerator" 16 | ValueTypes = "ValueType" 17 | } 18 | -------------------------------------------------------------------------------- /Types/Posh.NET/PSTypeName.txt: -------------------------------------------------------------------------------- 1 | Posh.NET -------------------------------------------------------------------------------- /Types/Posh.NET/Refresh.ps1: -------------------------------------------------------------------------------- 1 | foreach ($property in $this.psobject.properties) { 2 | if ($property -is [psnoteproperty] -and 3 | $property.Name -match '^\.') { 4 | $property.Value = @() 5 | } 6 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Abstract.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets abstract types. 4 | .DESCRIPTION 5 | Gets currently loaded abstract types. 6 | .EXAMPLE 7 | $posh.Net.Abstract 8 | #> 9 | foreach ($type in $this.Type) { 10 | if ($type.Attributes -band 'Abstract' -and -not ($type.Attributes -band 'Sealed')) { 11 | $type 12 | } 13 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Assembly.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets loaded assemblies 4 | .DESCRIPTION 5 | Gets the currently loaded assemblies. 6 | .EXAMPLE 7 | $Posh.Net.Assembly 8 | .EXAMPLE 9 | $Posh.Net.Assemblies 10 | #> 11 | [AppDomain]::CurrentDomain.GetAssemblies() -------------------------------------------------------------------------------- /Types/Posh.NET/get_Attribute.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets attribute types 4 | .DESCRIPTION 5 | Gets all currently loaded attribute types 6 | .EXAMPLE 7 | $Posh.Net.Attribute 8 | .EXAMPLE 9 | $Posh.Net.Attributes 10 | #> 11 | foreach ($type in $this.Type) { 12 | if ($type.IsSubclassOf([Attribute])) { 13 | $type 14 | } 15 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Cmdlet.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets cmdlet types 4 | .DESCRIPTION 5 | Gets .net types that are subclasses of Cmdlet. 6 | .EXAMPLE 7 | $posh.Net.Cmdlet 8 | .EXAMPLE 9 | $posh.Net.Cmdlets 10 | 11 | #> 12 | foreach ($type in $this.Public) { 13 | if ($type.IsSubclassOf([Management.Automation.Cmdlet])) { 14 | $type 15 | } 16 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Delegate.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets delegates 4 | .DESCRIPTION 5 | Gets all currently loaded delegates. 6 | .EXAMPLE 7 | $Posh.Net.Delegate 8 | .EXAMPLE 9 | $Posh.Net.Delegates 10 | #> 11 | foreach ($type in $this.Public) { 12 | if ($type.IsSubclassOf([Delegate])) { 13 | $type 14 | } 15 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Enum.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets enumerated typed 4 | .DESCRIPTION 5 | Gets all currently loaded enumerated types 6 | .EXAMPLE 7 | $Posh.Net.Enum 8 | .EXAMPLE 9 | $Posh.Net.Enums 10 | #> 11 | foreach ($type in $this.Type) { 12 | if ($type.IsEnum) { 13 | $type 14 | } 15 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Exception.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets exception types 4 | .DESCRIPTION 5 | Gets all currently loaded exception types 6 | .EXAMPLE 7 | $Posh.Net.Exception 8 | .EXAMPLE 9 | $Posh.Net.Exceptions 10 | #> 11 | foreach ($type in $this.Type) { 12 | if ($type.IsSubclassOf([Exception])) { 13 | $type 14 | } 15 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_ExtensionType.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets .NET extension types 4 | .DESCRIPTION 5 | Gets .NET Extension Types. 6 | 7 | These types define extension methods for LINQ. 8 | #> 9 | :nextType foreach ($type in $this.Type) { 10 | foreach ($attr in $type.GetCustomAttributes($false)) { 11 | if ($attr -is [Runtime.CompilerServices.ExtensionAttribute]) { 12 | $type 13 | continue nextType 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Generic.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets generic types. 4 | .DESCRIPTION 5 | Gets currently loaded generic types. 6 | .EXAMPLE 7 | $Posh.Net.Generic 8 | .EXAMPLE 9 | $Posh.Net.Generics 10 | #> 11 | foreach ($type in $this.Type) { 12 | if ($type.IsGenericType) { 13 | $type 14 | } 15 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Interface.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets all interfaces 4 | .DESCRIPTION 5 | Gets all currently loaded interfaces 6 | #> 7 | foreach ($type in $this.Type) { 8 | if ($type.IsInterface) { 9 | $type 10 | } 11 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Primitive.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets primitive types 4 | .DESCRIPTION 5 | Gets all primitive types. 6 | 7 | Primitive types are used to build all other types. 8 | .EXAMPLE 9 | $Posh.Net.Primitive 10 | #> 11 | foreach ($type in $this.Type) { 12 | if ($type.IsPrimitive) { 13 | $type 14 | } 15 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Private.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets private types 4 | .DESCRIPTION 5 | Gets all currently loaded private types 6 | .EXAMPLE 7 | $Posh.Net.Private 8 | #> 9 | foreach ($type in $this.Type) { 10 | if ($type.IsNotPublic) { 11 | $type 12 | } 13 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Public.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets public types 4 | .DESCRIPTION 5 | Gets all currently loaded public types. 6 | .EXAMPLE 7 | $Posh.Net.Public 8 | #> 9 | foreach ($type in $this.Type) { 10 | if ($type.IsPublic) { 11 | $type 12 | } 13 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_Static.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets static types. 4 | .DESCRIPTION 5 | Gets currently loaded static types. 6 | .EXAMPLE 7 | $posh.Net.Abstract 8 | #> 9 | foreach ($type in $this.Type) { 10 | if ($type.Attributes -band 'Abstract,Sealed') { 11 | $type 12 | } 13 | } -------------------------------------------------------------------------------- /Types/Posh.NET/get_TypeAccelerator.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets type accelerators 4 | .DESCRIPTION 5 | Gets currently loaded type accelerators. 6 | .EXAMPLE 7 | $posh.Net.TypeAccelerator 8 | .EXAMPLE 9 | $Posh.Net.TypeAccelerators 10 | .EXAMPLE 11 | $Posh.Net.Alias 12 | .EXAMPLE 13 | $Posh.Net.Aliases 14 | #> 15 | 16 | $accelerators = ([psobject].assembly.gettype("System.Management.Automation.TypeAccelerators")::Get) 17 | $acceleratorOutput = [Ordered]@{PSTypeName='Posh.Type.Accelerator'} 18 | foreach ($kv in $accelerators.GetEnumerator()) { 19 | if ($kv.Key -ne 'PSObject') { 20 | $acceleratorOutput[$kv.Key] = $kv.Value 21 | } 22 | } 23 | [PSCustomObject]$acceleratorOutput -------------------------------------------------------------------------------- /Types/Posh.NET/get_ValueType.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets Value Types 4 | .DESCRIPTION 5 | Gets currently loaded .NET value types 6 | 7 | (types that represent a single value) 8 | .EXAMPLE 9 | $posh.Net.ValueType 10 | .EXAMPLE 11 | $Posh.Net.ValueTypes 12 | #> 13 | foreach ($type in $this.Type) { 14 | if ($type.IsValueType) { 15 | $type 16 | } 17 | } -------------------------------------------------------------------------------- /Types/Posh.Parameters/Clear.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Clears default parameter values. 4 | .DESCRIPTION 5 | Clears all default parameter values. 6 | .EXAMPLE 7 | $posh.Parameters.Clear() 8 | #> 9 | $global:PSDefaultParameterValues.Clear() -------------------------------------------------------------------------------- /Types/Posh.Parameters/README.md: -------------------------------------------------------------------------------- 1 | One of the strengths of PowerShell is how it treats parameters. 2 | 3 | You can find metadata about any command's parameters. 4 | 5 | You can also provide default values for any command's parameters. 6 | 7 | `$Posh.Parameters` helps you Find PowerShell parameters and manage their default values. -------------------------------------------------------------------------------- /Types/Posh.Parameters/get_Defaults.ps1: -------------------------------------------------------------------------------- 1 | $defaultsByCommand = [Ordered]@{} 2 | foreach ($key in $global:PSDefaultParameterValues.Keys) { 3 | $commandName, $parameterName = $key -split ':',2 4 | if (-not $defaultsByCommand[$commandName]) { 5 | $defaultsByCommand[$commandName] = [Ordered]@{} 6 | } 7 | $defaultsByCommand[$commandName][$parameterName] = $global:PSDefaultParameterValues[$key] 8 | } 9 | $defaultsByCommand -------------------------------------------------------------------------------- /Types/Posh.Parameters/set_Defaults.ps1: -------------------------------------------------------------------------------- 1 | $argArray = @( 2 | foreach ($arg in $args) { 3 | $arg 4 | } 5 | ) 6 | $this.SetDefault.Invoke($argArray) 7 | -------------------------------------------------------------------------------- /Types/Posh.Preset.Command/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Apply = 'Use' 3 | } -------------------------------------------------------------------------------- /Types/Posh.Profiles/New.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Creates a new profile 4 | .DESCRIPTION 5 | Creates a new profile, or returns an existing profile. 6 | .EXAMPLE 7 | $Posh.Profile.New() 8 | #> 9 | param( 10 | # Which profile should be created? 11 | # The default is the current user's current host. 12 | [ValidateSet('AllUsersAllHosts','AllUsersCurrentHosts','CurrentUserAllHosts','CurrentUserCurrentHost')] 13 | [string] 14 | $WhichProfile = 'CurrentUserCurrentHost' 15 | ) 16 | 17 | $profilePath = $PROFILE.$WhichProfile 18 | 19 | if (Test-Path -LiteralPath $profilePath) { 20 | Get-Item -LiteralPath $profilePath 21 | } else { 22 | New-Item -ItemType File -Path $profilePath -Force 23 | } -------------------------------------------------------------------------------- /Types/Posh.Profiles/README.md: -------------------------------------------------------------------------------- 1 | PowerShell has profiles! 2 | 3 | Profiles run whenever PowerShell is loaded. 4 | 5 | They're great if there's a module you want to always load, or a variable you always want defined. 6 | 7 | To see how to manipulate PowerShell profiles with Posh, use $posh.Profiles | Get-Member -------------------------------------------------------------------------------- /Types/Posh.Profiles/Remove.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Removes content from a profile 4 | .DESCRIPTION 5 | Removes content from a PowerShell profile. 6 | #> 7 | param( 8 | # The content to remove. 9 | # If the content is a regular expression pattern, any matches will be removed. 10 | # Otherwise, any case-insensitive occurances of the string will be removed. 11 | $Content, 12 | 13 | # Which profile should the content be removed from? 14 | # The default is the current user's current host. 15 | [ValidateSet('AllUsersAllHosts','AllUsersCurrentHosts','CurrentUserAllHosts','CurrentUserCurrentHost')] 16 | [string] 17 | $WhichProfile = 'CurrentUserCurrentHost' 18 | ) 19 | 20 | $this.Replace($Content, '', $WhichProfile) -------------------------------------------------------------------------------- /Types/Posh.Profiles/get_Current.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the current Profile 4 | .DESCRIPTION 5 | Gets the current PowerShell Profile 6 | .EXAMPLE 7 | $posh.Profile.Current 8 | #> 9 | "$profile" 10 | -------------------------------------------------------------------------------- /Types/Posh.Profiles/get_Directory.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the profile directory 4 | .DESCRIPTION 5 | Gets the PowerShell profile's directory. 6 | .NOTES 7 | The Profile Directory is a wonderful place to store data. 8 | ( It is almost always writeable ) 9 | .EXAMPLE 10 | $Profile.Directory 11 | #> 12 | ($profile | Split-Path) -as [IO.DirectoryInfo] -------------------------------------------------------------------------------- /Types/Posh.Profiles/get_File.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the profile file 4 | .DESCRIPTION 5 | Gets the profile file for the current user in the current host. 6 | .EXAMPLE 7 | $Posh.Profile.File 8 | #> 9 | if (Test-Path "$profile") { 10 | Get-Item -LiteralPath "$profile" 11 | } -------------------------------------------------------------------------------- /Types/Posh.Profiles/get_Files.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the profile files 4 | .DESCRIPTION 5 | Gets the FileInfo objects for each profile that exists. 6 | .EXAMPLE 7 | $posh.Profile.Files 8 | #> 9 | foreach ($potentialPath in $profile.CurrentUserCurrentHost, $profile.CurrentUserAllHosts, $profile.AllUsersAllHosts, $profile.AllUsersCurrentHost) { 10 | if ([IO.File]::Exists($potentialPath)) { 11 | [IO.FileInfo]$potentialPath 12 | } 13 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.Article/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Url = "Link" 3 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.Article/get_DatePublished.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets an article's date published 4 | .DESCRIPTION 5 | Gets the date an article was published, as a `[DateTime]`. 6 | .EXAMPLE 7 | $Posh.News.Article.DatePublished 8 | #> 9 | $pubDateTime = $this.pubDate -as [DateTime] 10 | 11 | if ($pubDateTime) { 12 | $pubDateTime 13 | } 14 | else { 15 | [datetime]::MinValue 16 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.Article/get_Name.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets an article's name 4 | .DESCRIPTION 5 | Gets the name of an article in an RSS feed. 6 | #> 7 | if ($this.Title -and $this.Title -isnot [string]) { 8 | if ($this.Title.InnerText) { 9 | $this.Title.InnerText 10 | } elseif ($this.Title -is [object[]]) { 11 | $this.Title | Select-Object -Unique -First 1 12 | } 13 | } elseif ($this.Title) { 14 | $this.Title 15 | } elseif ($this.URL) { 16 | $thisURI = $this.URL -as [uri] 17 | $thisURI.Segments[-1] -replace '-', ' ' 18 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.Feed/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Articles = "Article" 3 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.Feed/get_Recent.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets recent articles 4 | .DESCRIPTION 5 | Gets recent articles in an RSS feed. 6 | #> 7 | $after = $this.Source.News.RecentDuration 8 | if (-not $after) { 9 | return 10 | } 11 | 12 | foreach ($article in $this.Article) { 13 | if (([DateTime]::Now - $article.DatePublished) -gt $after) { 14 | continue 15 | } 16 | $article 17 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | ByName = "Feed" 3 | } -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/README.md: -------------------------------------------------------------------------------- 1 | Modules can put News in their module manifest. 2 | 3 | Posh provides a simple RSS reader to help you stay up to date. 4 | 5 | To view recent articles, use 6 | 7 | ~~~PowerShell 8 | $Posh.News.Recent 9 | ~~~ 10 | 11 | To view all feeds, use 12 | 13 | ~~~PowerShell 14 | $Posh.News.All 15 | ~~~ 16 | 17 | To view all articles from all feeds, use 18 | 19 | ~~~PowerShell 20 | $Posh.News.All.Article 21 | ~~~ 22 | 23 | To see a specific feed, use: 24 | 25 | ~~~PowerShell 26 | $Posh.News.Feed["PowerShell Team"] 27 | ~~~ 28 | -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/get_Feed.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets feeds by name 4 | .DESCRIPTION 5 | Gets all feeds in a collection by name. 6 | #> 7 | param() 8 | $this.All | Group-Object Name -AsHashTable -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/get_Random.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets a random feed 4 | .DESCRIPTION 5 | Gets a random feed from a feed collection 6 | #> 7 | $this.All | Get-Random -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/get_Recent.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets all recent articles 4 | .DESCRIPTION 5 | Gets all recent articles in a feed collection, sorted by date published. 6 | .NOTES 7 | How "Recent" is defined in the a feed collection's `.RecentDuration` property. 8 | #> 9 | @(foreach ($feed in $this.All) { 10 | $feed.Recent 11 | }) | Sort-Object DatePublished -Descending -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/get_RecentDuration.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the duration considered recent 4 | .DESCRIPTION 5 | Gets the duration that is used to determine how recent an article is. 6 | 7 | By default, this is 45 days. 8 | #> 9 | if (-not $this.'.RecentDuration') { 10 | $this | 11 | Add-Member NoteProperty '.RecentDuration' (New-TimeSpan -Days 45) -Force 12 | } 13 | 14 | $this.'.RecentDuration' -------------------------------------------------------------------------------- /Types/Posh.RSS.FeedCollection/set_RecentDuration.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Sets the duration considered recent 4 | .DESCRIPTION 5 | Set the duration that is used to determine how recent an article is. 6 | #> 7 | param( 8 | [Timespan] 9 | $RecentDuration 10 | ) 11 | 12 | $this | 13 | Add-Member NoteProperty '.RecentDuration' $RecentDuration -Force -------------------------------------------------------------------------------- /Types/Posh.Recommendation/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | "Update" = "Install" 3 | } -------------------------------------------------------------------------------- /Types/Posh.Recommendation/Install.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Installs the recommended module 4 | .DESCRIPTION 5 | Uses Install-Module to install the recommended module. 6 | #> 7 | param( 8 | 9 | ) 10 | 11 | if ($this.Name -and -not $this.Url) { 12 | Install-Module $this.Name -Scope CurrentUser -Force 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Types/Posh.Stackable/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Before = "Prepend" 3 | After = "Append" 4 | Undo = "Pop" 5 | } -------------------------------------------------------------------------------- /Types/Posh.Stackable/Append.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Appends content to a stackable function 4 | .DESCRIPTION 5 | 6 | #> 7 | param( 8 | # The value to prepend. 9 | $Value 10 | ) 11 | 12 | $toAppend = if ($Value -is [ScriptBlock]) { 13 | $Value 14 | } else { 15 | [ScriptBlock]::Create($this.Stringify($Value)) 16 | } 17 | 18 | $currentFunction = $posh.ExecutionContext.SessionState.InvokeCommand.InvokeScript("`$function:$($this.FunctionName)")[0] 19 | $this.Current = {@(. $currentFunction; . $toAppend) -join ''}.GetNewClosure() -------------------------------------------------------------------------------- /Types/Posh.Stackable/Clear.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Clears a stackable function 4 | .DESCRIPTION 5 | Clears a stackable function, resetting it to it's original state. 6 | .EXAMPLE 7 | $Posh.Prompt.Clear() 8 | #> 9 | if ($this.Stack -and $this.Stack.Count) { 10 | 11 | $posh.ExecutionContext.SessionState.psvariable.Set("function:$($this.FunctionName)", @($this.Stack.ToArray())[-1]) 12 | $this.Stack.Clear() 13 | } -------------------------------------------------------------------------------- /Types/Posh.Stackable/Pop.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Pops the last value from a function stack 4 | .DESCRIPTION 5 | Pops the latest value from a function stack, such as the prompt. 6 | .EXAMPLE 7 | $Posh.Prompt.Pop() 8 | #> 9 | param( 10 | 11 | ) 12 | 13 | if ($this.Stack -and $this.Stack.Count) { 14 | $posh.ExecutionContext.SessionState.psvariable.Set("function:$($this.FunctionName)", $this.Stack.Pop()) 15 | } -------------------------------------------------------------------------------- /Types/Posh.Stackable/Posh.Input/README.md: -------------------------------------------------------------------------------- 1 | PowerShell has a robust input system. 2 | 3 | There's a very useful module by the name of PSReadLine that helps handle advanced input. 4 | 5 | Posh allows you to override the input function for PowerShell in a safe, stackable way. 6 | 7 | Pipe `$posh.Input` into `Get-Member` to see what it can do. -------------------------------------------------------------------------------- /Types/Posh.Stackable/Posh.Prompt/README.md: -------------------------------------------------------------------------------- 1 | `prompt` is the function that is called before PowerShell prompts for input. 2 | 3 | $Posh.Prompt allows you to customize the PowerShell prompt. 4 | 5 | Prompts are a cool way to customize your shell. 6 | 7 | Pipe $Posh.Prompt to Get-Member to see what it can do. -------------------------------------------------------------------------------- /Types/Posh.Stackable/Prepend.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Prepends content to a stackable function. 4 | .DESCRIPTION 5 | Prepends content to a stackable function. 6 | 7 | This takes the current entry and adds content to it's beginning. 8 | #> 9 | param( 10 | # The value to prepend. 11 | $Value 12 | ) 13 | 14 | 15 | 16 | $toPrepend = if ($Value -is [ScriptBlock]) { 17 | $Value 18 | } else { 19 | [ScriptBlock]::Create($this.Stringify($Value)) 20 | } 21 | 22 | $currentFunction = $posh.ExecutionContext.SessionState.InvokeCommand.InvokeScript("`$function:$($this.FunctionName)")[0] 23 | $this.Current = {@(. $toPrepend; . $currentFunction) -join ''}.GetNewClosure() -------------------------------------------------------------------------------- /Types/Posh.Stackable/Push.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Pushes an entry into a stackable function 4 | .DESCRIPTION 5 | Pushes an entry into a stackable function. 6 | 7 | This overwrites the existing entry, 8 | and adds the previous value to the stack so it can be easily undone. 9 | #> 10 | param( 11 | # The new value for the function 12 | [ScriptBlock] 13 | $Value 14 | ) 15 | 16 | $this.Current = $Value -------------------------------------------------------------------------------- /Types/Posh.Stackable/get_Current.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the value of a stackable function 4 | .DESCRIPTION 5 | Gets the current value of a stackable function. 6 | .EXAMPLE 7 | $posh.Prompt.Current 8 | #> 9 | $posh.ExecutionContext.SessionState.InvokeCommand.InvokeScript("`$function:$($this.FunctionName)") -------------------------------------------------------------------------------- /Types/Posh.Tip.Command/get_Content.ps1: -------------------------------------------------------------------------------- 1 | switch -regex ($this.Source) { 2 | '\.psd1$' { 3 | (Import-LocalizedData -BaseDirectory ($this.Source | Split-Path) -FileName ($this.Source | Split-Path -Leaf)).Content 4 | } 5 | '\.json$' { 6 | (Get-Content $this.Source -Raw | ConvertFrom-Json).Content 7 | } 8 | '\.md$' { 9 | Show-Markdown -LiteralPath $this.Source 10 | } 11 | '\.ps1$' { 12 | $showDemoCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand('Show-Demo', 'Function') 13 | if ($showDemoCommand) { 14 | $this.ScriptBlock 15 | } else { 16 | Get-Content $this.Source -Raw 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Types/Posh/Alias.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Error = "Errors" 3 | Profile = "Profiles" 4 | Recommend = 'Recommends' 5 | } -------------------------------------------------------------------------------- /Types/Posh/get_Errors.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Returns all errors 4 | .DESCRIPTION 5 | Returns all errors from the current session 6 | .EXAMPLE 7 | $Posh.Errors 8 | #> 9 | $global:Error -------------------------------------------------------------------------------- /Types/Posh/get_ExecutionContext.ps1: -------------------------------------------------------------------------------- 1 | $global:ExecutionContext -------------------------------------------------------------------------------- /Types/Posh/get_History.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the PowerShell History 4 | .DESCRIPTION 5 | Gets the history of commands run in this PowerShell session. 6 | .EXAMPLE 7 | $posh.History 8 | .LINK 9 | Get-History 10 | #> 11 | Get-History -------------------------------------------------------------------------------- /Types/Posh/get_Host.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the PowerShell Host 4 | .DESCRIPTION 5 | Gets the current PowerShell Host 6 | .EXAMPLE 7 | $posh.Host 8 | 9 | #> 10 | $global:host -------------------------------------------------------------------------------- /Types/Posh/get_Jobs.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets PowerShell Jobs 4 | .DESCRIPTION 5 | Gets PowerShell Background Jobs 6 | .EXAMPLE 7 | $posh.Jobs 8 | .Link 9 | Get-Job 10 | .Link 11 | Start-Job 12 | #> 13 | Get-Job -------------------------------------------------------------------------------- /Types/Posh/get_Modules.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the loaded modules 4 | .DESCRIPTION 5 | Gets the PowerShell modules loaded in the current session. 6 | #> 7 | Get-Module -------------------------------------------------------------------------------- /Types/Posh/get_NET.ps1: -------------------------------------------------------------------------------- 1 | if (-not $this.'.NET') { 2 | $this | Add-Member NoteProperty '.NET' -Value ([PSCustomObject]@{PSTypeName='Posh.NET'}) 3 | } 4 | 5 | $this.'.NET' -------------------------------------------------------------------------------- /Types/Posh/get_Process.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the PowerShell Process 4 | .DESCRIPTION 5 | Gets the process currently hosting PowerShell 6 | .EXAMPLE 7 | $posh.Process 8 | #> 9 | Get-Process -id $PID -------------------------------------------------------------------------------- /Types/Posh/get_Profiles.ps1: -------------------------------------------------------------------------------- 1 | $profile -------------------------------------------------------------------------------- /Types/Posh/get_Recommends.ps1: -------------------------------------------------------------------------------- 1 | foreach ($module in $posh.Modules) { 2 | $module.Recommendation 3 | } -------------------------------------------------------------------------------- /Types/Posh/get_Runspace.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the PowerShell Runspaces 4 | .DESCRIPTION 5 | Gets the current PowerShell Runspace. 6 | .EXAMPLE 7 | $posh.Runspace 8 | #> 9 | $host.Runspace -------------------------------------------------------------------------------- /Types/TimeZoneInfo/PSTypeName.txt: -------------------------------------------------------------------------------- 1 | System.TimeZoneInfo -------------------------------------------------------------------------------- /Types/TimeZoneInfo/get_LocalTime.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the local time 4 | .DESCRIPTION 5 | Gets the local time for a timezone. 6 | .EXAMPLE 7 | Get-TimeZone -ListAvailable 8 | .EXAMPLE 9 | Get-TimeZone | Select LocalTime 10 | #> 11 | [DateTime]::UTCNow + $this.GetUtcOffset([DateTime]::UtcNow) -------------------------------------------------------------------------------- /docs/Assets/Get-Command-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Get-Command-In-Color.gif -------------------------------------------------------------------------------- /docs/Assets/Get-Member-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Get-Member-In-Color.gif -------------------------------------------------------------------------------- /docs/Assets/Improved-File-Formatting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Improved-File-Formatting.gif -------------------------------------------------------------------------------- /docs/Assets/Posh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Posh.png -------------------------------------------------------------------------------- /docs/Assets/Posh@1080p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Posh@1080p.png -------------------------------------------------------------------------------- /docs/Assets/Reflection-Formatting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Reflection-Formatting.gif -------------------------------------------------------------------------------- /docs/Assets/Regex-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/Regex-In-Color.gif -------------------------------------------------------------------------------- /docs/Assets/XML-In-Color.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StartAutomating/Posh/946bbe81e73fdaa33f4e4c5a3a15b129d1efe1e7/docs/Assets/XML-In-Color.gif -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | posh.startautomating.com -------------------------------------------------------------------------------- /docs/Posh.Commands.FindExtensions.md: -------------------------------------------------------------------------------- 1 | Posh.Commands.FindExtensions() 2 | ------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Examples 22 | #### EXAMPLE 1 23 | ```PowerShell 24 | $posh.Commands.FindExtensions($posh, "$pwd") 25 | ``` 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh.Errors.LineLike.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.LineLike() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Filters errors by line wildcard 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Filters entries in $Error for items that a .Line like a wildcard. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $error.LineLike("Get-*") 28 | ``` 29 | 30 | 31 | 32 | --- 33 | 34 | 35 | ### Parameters 36 | #### **Like** 37 | 38 | A wildcard pattern. 39 | 40 | 41 | 42 | 43 | 44 | 45 | |Type |Required|Position|PipelineInput| 46 | |----------|--------|--------|-------------| 47 | |`[String]`|false |1 |false | 48 | 49 | 50 | 51 | 52 | 53 | --- 54 | -------------------------------------------------------------------------------- /docs/Posh.Errors.get_ByLine.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.get_ByLine() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets errors by line 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all lines that produced errors 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $error.ByLine 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Errors.get_ByType.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.get_ByType() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Errors By Type 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Returns all errors, by type of error. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Errors.ByType 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Errors.get_History.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.get_History() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Error History 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the history items associated with PowerShell Errors 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Error.History 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.get_All.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_All() 2 | ---------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all items in an extension collection. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all items in a collection of extended commands. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.get_CommandType.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_CommandType() 2 | ------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's CommandType 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the extended CommandTypes(s) that are stored in an extension collection. 18 | 19 | CommandTypes can be defined in a module's manifest. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.get_Count.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Count() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the extension count. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the count of all extensions in a collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.get_Module.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Module() 2 | ------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the module that defines extended types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.get_Path.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Path() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's Path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the Path(s) that store extensions in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.get_Random.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Random() 2 | ------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a random extended command 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets a random extended command from an ExtensionCollection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.set_Module.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.set_Module() 2 | ------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the module that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Module** 26 | 27 | The module. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |----------------|--------|--------|-------------| 36 | |`[PSModuleInfo]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh.ExtensionCollection.set_Path.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.set_Path() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the path that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Path** 26 | 27 | The path. If this is empty, only extensions that are functions or aliases will be found. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |------------|--------|--------|-------------| 36 | |`[String[]]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh.Host.Choose.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Choose() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prompts a choice 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prompts a choice between multiple options. 18 | 19 | An option can be a string, hashtable, or scriptblock. 20 | 21 | Hashtables keys and arrays will become a list of possible choices. 22 | 23 | Strings will be outputted as a message. 24 | 25 | A boolean will indicate multiple items can be chosen. 26 | 27 | 28 | 29 | --- 30 | 31 | 32 | ### Examples 33 | #### EXAMPLE 1 34 | ```PowerShell 35 | $Posh.Host.Choose( 36 | "Cake Or Death?", 37 | @("Cake", "Death") 38 | ) 39 | ``` 40 | 41 | 42 | 43 | --- 44 | -------------------------------------------------------------------------------- /docs/Posh.Host.Cursor.Hide.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.Hide() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Hides the cursor 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Hides the cursor. This is not supported in all terminals. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | This method returns an escape sequence (it should be invisible). 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh.Host.Cursor.SetPosition.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.SetPosition() 2 | ------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the cursor position. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the position of the cursor. This is not supported in all terminals. 18 | 19 | The position can be provided as a pair of integers. 20 | 21 | The first integer will be the row, the second integer will be the column. 22 | 23 | The position can also be provided as an object with any of the following properties: 24 | 25 | * X/Column/Left 26 | * Y/Row/Top 27 | 28 | 29 | 30 | --- 31 | 32 | 33 | ### Notes 34 | This method returns an escape sequence (it should be invisible). 35 | 36 | 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /docs/Posh.Host.Cursor.Show.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.Show() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Shows the cursor 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Shows the cursor. This is not supported in all terminals. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | This method returns an escape sequence (it should be invisible). 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh.Host.Cursor.Up.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.Up() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Moves the cursor up 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Moves the cursor N (default 1) cells up. 18 | If the cursor is already at the edge of the screen, this has no effect. 19 | 20 | 21 | 22 | --- 23 | 24 | 25 | ### Parameters 26 | #### **Distance** 27 | 28 | How far the cursor should move 29 | 30 | 31 | 32 | 33 | 34 | 35 | |Type |Required|Position|PipelineInput|Aliases| 36 | |---------|--------|--------|-------------|-------| 37 | |`[Int32]`|false |1 |false |N | 38 | 39 | 40 | 41 | 42 | 43 | --- 44 | -------------------------------------------------------------------------------- /docs/Posh.Host.Cursor.get_Position.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.get_Position() 2 | ------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the cursor position 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the cursor position 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Host.Cursor.Position 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Host.get_Cursor.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Cursor() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the cursor 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the console cursor. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Host.Cursor 28 | ``` 29 | 30 | #### EXAMPLE 2 31 | ```PowerShell 32 | $Posh.Host.Cursor 33 | ``` 34 | 35 | #### EXAMPLE 3 36 | ```PowerShell 37 | $Posh.Cursor.Position 38 | ``` 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh.Host.get_Height.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Height() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the height of the host 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the height of the host (in characters). 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Host.Height 28 | ``` 29 | 30 | #### EXAMPLE 2 31 | ```PowerShell 32 | $Host.Height 33 | ``` 34 | 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh.Host.get_Title.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Title() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the host's title 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the host's window title. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Title 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Host.get_Width.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Width() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the Width of the host 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the Width of the host (in characters). 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Host.Width 28 | ``` 29 | 30 | #### EXAMPLE 2 31 | ```PowerShell 32 | $Host.Width 33 | ``` 34 | 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh.Host.set_Title.md: -------------------------------------------------------------------------------- 1 | Posh.Host.set_Title() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the host's title 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the host's window title. 18 | 19 | Unfortunately, this will be ignored if running in Visual Studio Code. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | #### EXAMPLE 1 28 | ```PowerShell 29 | $Posh.Title = "Sup?" 30 | ``` 31 | 32 | 33 | 34 | --- 35 | 36 | 37 | ### Parameters 38 | #### **Title** 39 | 40 | 41 | 42 | 43 | |Type |Required|Position|PipelineInput| 44 | |----------|--------|--------|-------------| 45 | |`[String]`|false |1 |false | 46 | 47 | 48 | 49 | 50 | 51 | --- 52 | -------------------------------------------------------------------------------- /docs/Posh.Input.Append.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Append() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Appends content to a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Parameters 22 | #### **Value** 23 | 24 | The value to prepend. 25 | 26 | 27 | 28 | 29 | 30 | 31 | |Type |Required|Position|PipelineInput| 32 | |----------|--------|--------|-------------| 33 | |`[Object]`|false |1 |false | 34 | 35 | 36 | 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh.Input.Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Clear() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears a stackable function, resetting it to it's original state. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Prompt.Clear() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Input.Pop.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Pop() 2 | ---------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pops the last value from a function stack 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pops the latest value from a function stack, such as the prompt. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Prompt.Pop() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Input.Prepend.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Prepend() 2 | -------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prepends content to a stackable function. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prepends content to a stackable function. 18 | 19 | This takes the current entry and adds content to it's beginning. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Value** 28 | 29 | The value to prepend. 30 | 31 | 32 | 33 | 34 | 35 | 36 | |Type |Required|Position|PipelineInput| 37 | |----------|--------|--------|-------------| 38 | |`[Object]`|false |1 |false | 39 | 40 | 41 | 42 | 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /docs/Posh.Input.Push.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Push() 2 | ----------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pushes an entry into a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pushes an entry into a stackable function. 18 | 19 | This overwrites the existing entry, 20 | and adds the previous value to the stack so it can be easily undone. 21 | 22 | 23 | 24 | --- 25 | 26 | 27 | ### Parameters 28 | #### **Value** 29 | 30 | The new value for the function 31 | 32 | 33 | 34 | 35 | 36 | 37 | |Type |Required|Position|PipelineInput| 38 | |---------------|--------|--------|-------------| 39 | |`[ScriptBlock]`|false |1 |false | 40 | 41 | 42 | 43 | 44 | 45 | --- 46 | -------------------------------------------------------------------------------- /docs/Posh.Input.Stringify.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Stringify() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Converts into a stringified value 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Converts an item into a stringified value. 18 | 19 | This is used internally by stackable functions when they are prepending or appending. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Prompt** 28 | 29 | 30 | 31 | 32 | |Type |Required|Position|PipelineInput| 33 | |----------|--------|--------|-------------| 34 | |`[Object]`|false |1 |false | 35 | 36 | 37 | 38 | 39 | 40 | --- 41 | -------------------------------------------------------------------------------- /docs/Posh.Input.get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Input.get_Current() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the value of a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current value of a stackable function. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Prompt.Current 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Input.set_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Input.set_Current() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the current implementation of a function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the current imlementation of a stackable function. 18 | 19 | Stackable functions keep a stack of all prior entries for easy undo. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | #### EXAMPLE 1 28 | ```PowerShell 29 | $Posh.Prompt.Current = {"?"} 30 | ``` 31 | 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh.Parameters.Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Parameters.Clear() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears default parameter values. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears all default parameter values. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Parameters.Clear() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.get_All.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_All() 2 | -------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all items in an extension collection. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all items in a collection of extended commands. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.get_CommandType.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_CommandType() 2 | ---------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's CommandType 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the extended CommandTypes(s) that are stored in an extension collection. 18 | 19 | CommandTypes can be defined in a module's manifest. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.get_Count.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Count() 2 | ---------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the extension count. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the count of all extensions in a collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.get_Module.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Module() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the module that defines extended types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.get_Path.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Path() 2 | --------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's Path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the Path(s) that store extensions in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.get_Random.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Random() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a random extended command 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets a random extended command from an ExtensionCollection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.set_Module.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.set_Module() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the module that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Module** 26 | 27 | The module. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |----------------|--------|--------|-------------| 36 | |`[PSModuleInfo]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Collection.set_Path.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.set_Path() 2 | --------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the path that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Path** 26 | 27 | The path. If this is empty, only extensions that are functions or aliases will be found. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |------------|--------|--------|-------------| 36 | |`[String[]]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh.Preset.Command.Use.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Command.Use() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Uses a preset 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Uses or applies a Posh preset. 18 | 19 | Posh presets will take the data in a *.preset.* file and apply it to a variable. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh.Profiles.get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_Current() 2 | --------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the current Profile 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current PowerShell Profile 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Profile.Current 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Profiles.get_Directory.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_Directory() 2 | ----------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the profile directory 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the PowerShell profile's directory. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Profile.Directory 28 | ``` 29 | 30 | 31 | 32 | --- 33 | 34 | 35 | ### Notes 36 | The Profile Directory is a wonderful place to store data. 37 | ( It is almost always writeable ) 38 | 39 | 40 | 41 | --- 42 | -------------------------------------------------------------------------------- /docs/Posh.Profiles.get_File.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_File() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the profile file 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the profile file for the current user in the current host. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Profile.File 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Profiles.get_Files.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_Files() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the profile files 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the FileInfo objects for each profile that exists. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Profile.Files 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.Append.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Append() 2 | -------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Appends content to a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Parameters 22 | #### **Value** 23 | 24 | The value to prepend. 25 | 26 | 27 | 28 | 29 | 30 | 31 | |Type |Required|Position|PipelineInput| 32 | |----------|--------|--------|-------------| 33 | |`[Object]`|false |1 |false | 34 | 35 | 36 | 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Clear() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears a stackable function, resetting it to it's original state. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Prompt.Clear() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.Pop.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Pop() 2 | ----------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pops the last value from a function stack 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pops the latest value from a function stack, such as the prompt. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Prompt.Pop() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.Prepend.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Prepend() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prepends content to a stackable function. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prepends content to a stackable function. 18 | 19 | This takes the current entry and adds content to it's beginning. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Value** 28 | 29 | The value to prepend. 30 | 31 | 32 | 33 | 34 | 35 | 36 | |Type |Required|Position|PipelineInput| 37 | |----------|--------|--------|-------------| 38 | |`[Object]`|false |1 |false | 39 | 40 | 41 | 42 | 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.Push.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Push() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pushes an entry into a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pushes an entry into a stackable function. 18 | 19 | This overwrites the existing entry, 20 | and adds the previous value to the stack so it can be easily undone. 21 | 22 | 23 | 24 | --- 25 | 26 | 27 | ### Parameters 28 | #### **Value** 29 | 30 | The new value for the function 31 | 32 | 33 | 34 | 35 | 36 | 37 | |Type |Required|Position|PipelineInput| 38 | |---------------|--------|--------|-------------| 39 | |`[ScriptBlock]`|false |1 |false | 40 | 41 | 42 | 43 | 44 | 45 | --- 46 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.Stringify.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Stringify() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Converts into a stringified value 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Converts an item into a stringified value. 18 | 19 | This is used internally by stackable functions when they are prepending or appending. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Prompt** 28 | 29 | 30 | 31 | 32 | |Type |Required|Position|PipelineInput| 33 | |----------|--------|--------|-------------| 34 | |`[Object]`|false |1 |false | 35 | 36 | 37 | 38 | 39 | 40 | --- 41 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.get_Current() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the value of a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current value of a stackable function. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Prompt.Current 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Prompt.set_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.set_Current() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the current implementation of a function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the current imlementation of a stackable function. 18 | 19 | Stackable functions keep a stack of all prior entries for easy undo. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | #### EXAMPLE 1 28 | ```PowerShell 29 | $Posh.Prompt.Current = {"?"} 30 | ``` 31 | 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh.RSS.Article.get_DatePublished.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Article.get_DatePublished() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an article's date published 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the date an article was published, as a `[DateTime]`. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.News.Article.DatePublished 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.RSS.Article.get_Name.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Article.get_Name() 2 | --------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an article's name 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the name of an article in an RSS feed. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.RSS.Feed.get_Article.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Feed.get_Article() 2 | --------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets articles in a feed. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the articles in a RSS feed. 18 | 19 | Articles will be cached for performance. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | #### EXAMPLE 1 28 | ```PowerShell 29 | $Posh.News.Article # Get all articles from all feeds associated with Posh. 30 | ``` 31 | 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh.RSS.Feed.get_Recent.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Feed.get_Recent() 2 | -------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets recent articles 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets recent articles in an RSS feed. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.RSS.FeedCollection.get_Feed.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_Feed() 2 | ---------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets feeds by name 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all feeds in a collection by name. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.RSS.FeedCollection.get_Random.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_Random() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a random feed 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets a random feed from a feed collection 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.RSS.FeedCollection.get_Recent.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_Recent() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all recent articles 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all recent articles in a feed collection, sorted by date published. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | How "Recent" is defined in the a feed collection's `.RecentDuration` property. 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh.RSS.FeedCollection.get_RecentDuration.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_RecentDuration() 2 | -------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the duration considered recent 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the duration that is used to determine how recent an article is. 18 | 19 | By default, this is 45 days. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh.RSS.FeedCollection.set_RecentDuration.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.set_RecentDuration() 2 | -------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the duration considered recent 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Set the duration that is used to determine how recent an article is. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **RecentDuration** 26 | 27 | 28 | 29 | 30 | |Type |Required|Position|PipelineInput| 31 | |------------|--------|--------|-------------| 32 | |`[TimeSpan]`|false |1 |false | 33 | 34 | 35 | 36 | 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.Append.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Append() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Appends content to a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Parameters 22 | #### **Value** 23 | 24 | The value to prepend. 25 | 26 | 27 | 28 | 29 | 30 | 31 | |Type |Required|Position|PipelineInput| 32 | |----------|--------|--------|-------------| 33 | |`[Object]`|false |1 |false | 34 | 35 | 36 | 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Clear() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears a stackable function, resetting it to it's original state. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Prompt.Clear() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.Pop.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Pop() 2 | -------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pops the last value from a function stack 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pops the latest value from a function stack, such as the prompt. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Prompt.Pop() 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.Prepend.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Prepend() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prepends content to a stackable function. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prepends content to a stackable function. 18 | 19 | This takes the current entry and adds content to it's beginning. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Value** 28 | 29 | The value to prepend. 30 | 31 | 32 | 33 | 34 | 35 | 36 | |Type |Required|Position|PipelineInput| 37 | |----------|--------|--------|-------------| 38 | |`[Object]`|false |1 |false | 39 | 40 | 41 | 42 | 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.Push.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Push() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pushes an entry into a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pushes an entry into a stackable function. 18 | 19 | This overwrites the existing entry, 20 | and adds the previous value to the stack so it can be easily undone. 21 | 22 | 23 | 24 | --- 25 | 26 | 27 | ### Parameters 28 | #### **Value** 29 | 30 | The new value for the function 31 | 32 | 33 | 34 | 35 | 36 | 37 | |Type |Required|Position|PipelineInput| 38 | |---------------|--------|--------|-------------| 39 | |`[ScriptBlock]`|false |1 |false | 40 | 41 | 42 | 43 | 44 | 45 | --- 46 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.Stringify.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Stringify() 2 | -------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Converts into a stringified value 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Converts an item into a stringified value. 18 | 19 | This is used internally by stackable functions when they are prepending or appending. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Prompt** 28 | 29 | 30 | 31 | 32 | |Type |Required|Position|PipelineInput| 33 | |----------|--------|--------|-------------| 34 | |`[Object]`|false |1 |false | 35 | 36 | 37 | 38 | 39 | 40 | --- 41 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.get_Current() 2 | ---------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the value of a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current value of a stackable function. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Prompt.Current 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.Stackable.set_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.set_Current() 2 | ---------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the current implementation of a function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the current imlementation of a stackable function. 18 | 19 | Stackable functions keep a stack of all prior entries for easy undo. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | #### EXAMPLE 1 28 | ```PowerShell 29 | $Posh.Prompt.Current = {"?"} 30 | ``` 31 | 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh.get_Errors.md: -------------------------------------------------------------------------------- 1 | Posh.get_Errors() 2 | ----------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Returns all errors 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Returns all errors from the current session 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $Posh.Errors 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.get_History.md: -------------------------------------------------------------------------------- 1 | Posh.get_History() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell History 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the history of commands run in this PowerShell session. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Related Links 25 | * [Get-History](https://docs.microsoft.com/powershell/module/Microsoft.PowerShell.Core/Get-History) 26 | 27 | 28 | 29 | 30 | 31 | --- 32 | 33 | 34 | ### Examples 35 | #### EXAMPLE 1 36 | ```PowerShell 37 | $posh.History 38 | ``` 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh.get_Host.md: -------------------------------------------------------------------------------- 1 | Posh.get_Host() 2 | --------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell Host 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current PowerShell Host 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Host 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.get_Jobs.md: -------------------------------------------------------------------------------- 1 | Posh.get_Jobs() 2 | --------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets PowerShell Jobs 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets PowerShell Background Jobs 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Related Links 25 | * [Get-Job](https://docs.microsoft.com/powershell/module/Microsoft.PowerShell.Core/Get-Job) 26 | 27 | 28 | 29 | * [Start-Job](https://docs.microsoft.com/powershell/module/Microsoft.PowerShell.Core/Start-Job) 30 | 31 | 32 | 33 | 34 | 35 | --- 36 | 37 | 38 | ### Examples 39 | #### EXAMPLE 1 40 | ```PowerShell 41 | $posh.Jobs 42 | ``` 43 | 44 | 45 | 46 | --- 47 | -------------------------------------------------------------------------------- /docs/Posh.get_Modules.md: -------------------------------------------------------------------------------- 1 | Posh.get_Modules() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the loaded modules 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the PowerShell modules loaded in the current session. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh.get_Process.md: -------------------------------------------------------------------------------- 1 | Posh.get_Process() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell Process 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the process currently hosting PowerShell 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Process 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh.get_Runspace.md: -------------------------------------------------------------------------------- 1 | Posh.get_Runspace() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell Runspaces 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current PowerShell Runspace. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Runspace 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Commands/FindExtensions.md: -------------------------------------------------------------------------------- 1 | Posh.Commands.FindExtensions() 2 | ------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Examples 22 | > EXAMPLE 1 23 | 24 | ```PowerShell 25 | $posh.Commands.FindExtensions($posh, "$pwd") 26 | ``` 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh/Commands/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Commands 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [FindExtensions](FindExtensions.md) 8 | -------------------------------------------------------------------------------- /docs/Posh/Errors/LineLike.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.LineLike() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Filters errors by line wildcard 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Filters entries in $Error for items that a .Line like a wildcard. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $error.LineLike("Get-*") 29 | ``` 30 | 31 | 32 | --- 33 | 34 | 35 | ### Parameters 36 | #### **Like** 37 | 38 | A wildcard pattern. 39 | 40 | 41 | 42 | 43 | 44 | 45 | |Type |Required|Position|PipelineInput| 46 | |----------|--------|--------|-------------| 47 | |`[String]`|false |1 |false | 48 | 49 | 50 | 51 | 52 | 53 | --- 54 | -------------------------------------------------------------------------------- /docs/Posh/Errors/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Errors 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [LineLike](LineLike.md) 8 | * [LineMatch](LineMatch.md) 9 | * [get_ByLine](get_ByLine.md) 10 | * [get_ByType](get_ByType.md) 11 | * [get_History](get_History.md) 12 | -------------------------------------------------------------------------------- /docs/Posh/Errors/get_ByLine.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.get_ByLine() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets errors by line 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all lines that produced errors 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $error.ByLine 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Errors/get_ByType.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.get_ByType() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Errors By Type 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Returns all errors, by type of error. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Errors.ByType 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Errors/get_History.md: -------------------------------------------------------------------------------- 1 | Posh.Errors.get_History() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Error History 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the history items associated with PowerShell Errors 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Error.History 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.ExtensionCollection 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [get_All](get_All.md) 8 | * [get_CommandType](get_CommandType.md) 9 | * [set_CommandType](set_CommandType.md) 10 | * [get_Count](get_Count.md) 11 | * [get_Module](get_Module.md) 12 | * [set_Module](set_Module.md) 13 | * [get_Path](get_Path.md) 14 | * [set_Path](set_Path.md) 15 | * [get_Random](get_Random.md) 16 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/get_All.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_All() 2 | ---------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all items in an extension collection. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all items in a collection of extended commands. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/get_CommandType.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_CommandType() 2 | ------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's CommandType 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the extended CommandTypes(s) that are stored in an extension collection. 18 | 19 | CommandTypes can be defined in a module's manifest. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/get_Count.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Count() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the extension count. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the count of all extensions in a collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/get_Module.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Module() 2 | ------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the module that defines extended types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/get_Path.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Path() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's Path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the Path(s) that store extensions in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/get_Random.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.get_Random() 2 | ------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a random extended command 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets a random extended command from an ExtensionCollection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/set_Module.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.set_Module() 2 | ------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the module that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Module** 26 | 27 | The module. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |----------------|--------|--------|-------------| 36 | |`[PSModuleInfo]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh/ExtensionCollection/set_Path.md: -------------------------------------------------------------------------------- 1 | Posh.ExtensionCollection.set_Path() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the path that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Path** 26 | 27 | The path. If this is empty, only extensions that are functions or aliases will be found. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |------------|--------|--------|-------------| 36 | |`[String[]]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh/Host/Choose.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Choose() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prompts a choice 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prompts a choice between multiple options. 18 | 19 | An option can be a string, hashtable, or scriptblock. 20 | 21 | Hashtables keys and arrays will become a list of possible choices. 22 | 23 | Strings will be outputted as a message. 24 | 25 | A boolean will indicate multiple items can be chosen. 26 | 27 | 28 | 29 | --- 30 | 31 | 32 | ### Examples 33 | > EXAMPLE 1 34 | 35 | ```PowerShell 36 | $Posh.Host.Choose( 37 | "Cake Or Death?", 38 | @("Cake", "Death") 39 | ) 40 | ``` 41 | 42 | 43 | --- 44 | -------------------------------------------------------------------------------- /docs/Posh/Host/Cursor/Hide.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.Hide() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Hides the cursor 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Hides the cursor. This is not supported in all terminals. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | This method returns an escape sequence (it should be invisible). 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh/Host/Cursor/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Host.Cursor 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [Back](Back.md) 8 | * [Down](Down.md) 9 | * [Forward](Forward.md) 10 | * [Hide](Hide.md) 11 | * [PageDown](PageDown.md) 12 | * [PageUp](PageUp.md) 13 | * [SetPosition](SetPosition.md) 14 | * [Show](Show.md) 15 | * [Up](Up.md) 16 | * [get_Position](get_Position.md) 17 | -------------------------------------------------------------------------------- /docs/Posh/Host/Cursor/SetPosition.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.SetPosition() 2 | ------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the cursor position. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the position of the cursor. This is not supported in all terminals. 18 | 19 | The position can be provided as a pair of integers. 20 | 21 | The first integer will be the row, the second integer will be the column. 22 | 23 | The position can also be provided as an object with any of the following properties: 24 | 25 | * X/Column/Left 26 | * Y/Row/Top 27 | 28 | 29 | 30 | --- 31 | 32 | 33 | ### Notes 34 | This method returns an escape sequence (it should be invisible). 35 | 36 | 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /docs/Posh/Host/Cursor/Show.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.Show() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Shows the cursor 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Shows the cursor. This is not supported in all terminals. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | This method returns an escape sequence (it should be invisible). 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh/Host/Cursor/Up.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.Up() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Moves the cursor up 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Moves the cursor N (default 1) cells up. 18 | If the cursor is already at the edge of the screen, this has no effect. 19 | 20 | 21 | 22 | --- 23 | 24 | 25 | ### Parameters 26 | #### **Distance** 27 | 28 | How far the cursor should move 29 | 30 | 31 | 32 | 33 | 34 | 35 | |Type |Required|Position|PipelineInput|Aliases| 36 | |---------|--------|--------|-------------|-------| 37 | |`[Int32]`|false |1 |false |N | 38 | 39 | 40 | 41 | 42 | 43 | --- 44 | -------------------------------------------------------------------------------- /docs/Posh/Host/Cursor/get_Position.md: -------------------------------------------------------------------------------- 1 | Posh.Host.Cursor.get_Position() 2 | ------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the cursor position 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the cursor position 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Host.Cursor.Position 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Host/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Host 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [Choose](Choose.md) 8 | * [get_Cursor](get_Cursor.md) 9 | * [get_Height](get_Height.md) 10 | * [get_Title](get_Title.md) 11 | * [set_Title](set_Title.md) 12 | * [get_Width](get_Width.md) 13 | -------------------------------------------------------------------------------- /docs/Posh/Host/get_Cursor.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Cursor() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the cursor 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the console cursor. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Host.Cursor 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Host.Cursor 34 | ``` 35 | > EXAMPLE 3 36 | 37 | ```PowerShell 38 | $Posh.Cursor.Position 39 | ``` 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh/Host/get_Height.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Height() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the height of the host 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the height of the host (in characters). 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Host.Height 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Host.Height 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/Host/get_Title.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Title() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the host's title 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the host's window title. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Title 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Host/get_Width.md: -------------------------------------------------------------------------------- 1 | Posh.Host.get_Width() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the Width of the host 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the Width of the host (in characters). 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Host.Width 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Host.Width 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/Host/set_Title.md: -------------------------------------------------------------------------------- 1 | Posh.Host.set_Title() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the host's title 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the host's window title. 18 | 19 | Unfortunately, this will be ignored if running in Visual Studio Code. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $Posh.Title = "Sup?" 31 | ``` 32 | 33 | 34 | --- 35 | 36 | 37 | ### Parameters 38 | #### **Title** 39 | 40 | 41 | 42 | 43 | |Type |Required|Position|PipelineInput| 44 | |----------|--------|--------|-------------| 45 | |`[String]`|false |1 |false | 46 | 47 | 48 | 49 | 50 | 51 | --- 52 | -------------------------------------------------------------------------------- /docs/Posh/Input/Append.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Append() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Appends content to a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Parameters 22 | #### **Value** 23 | 24 | The value to prepend. 25 | 26 | 27 | 28 | 29 | 30 | 31 | |Type |Required|Position|PipelineInput| 32 | |----------|--------|--------|-------------| 33 | |`[Object]`|false |1 |false | 34 | 35 | 36 | 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh/Input/Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Clear() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears a stackable function, resetting it to it's original state. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Prompt.Clear() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Input/Pop.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Pop() 2 | ---------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pops the last value from a function stack 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pops the latest value from a function stack, such as the prompt. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Prompt.Pop() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Input/Prepend.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Prepend() 2 | -------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prepends content to a stackable function. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prepends content to a stackable function. 18 | 19 | This takes the current entry and adds content to it's beginning. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Value** 28 | 29 | The value to prepend. 30 | 31 | 32 | 33 | 34 | 35 | 36 | |Type |Required|Position|PipelineInput| 37 | |----------|--------|--------|-------------| 38 | |`[Object]`|false |1 |false | 39 | 40 | 41 | 42 | 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /docs/Posh/Input/Push.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Push() 2 | ----------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pushes an entry into a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pushes an entry into a stackable function. 18 | 19 | This overwrites the existing entry, 20 | and adds the previous value to the stack so it can be easily undone. 21 | 22 | 23 | 24 | --- 25 | 26 | 27 | ### Parameters 28 | #### **Value** 29 | 30 | The new value for the function 31 | 32 | 33 | 34 | 35 | 36 | 37 | |Type |Required|Position|PipelineInput| 38 | |---------------|--------|--------|-------------| 39 | |`[ScriptBlock]`|false |1 |false | 40 | 41 | 42 | 43 | 44 | 45 | --- 46 | -------------------------------------------------------------------------------- /docs/Posh/Input/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Input 2 | 3 | 4 | PowerShell has a robust input system. 5 | 6 | There's a very useful module by the name of PSReadLine that helps handle advanced input. 7 | 8 | Posh allows you to override the input function for PowerShell in a safe, stackable way. 9 | 10 | Pipe `$posh.Input` into `Get-Member` to see what it can do. 11 | ### Script Methods 12 | 13 | 14 | * [Append](Append.md) 15 | * [Clear](Clear.md) 16 | * [Pop](Pop.md) 17 | * [Prepend](Prepend.md) 18 | * [Push](Push.md) 19 | * [Replace](Replace.md) 20 | * [Stringify](Stringify.md) 21 | * [get_Current](get_Current.md) 22 | * [set_Current](set_Current.md) 23 | -------------------------------------------------------------------------------- /docs/Posh/Input/Stringify.md: -------------------------------------------------------------------------------- 1 | Posh.Input.Stringify() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Converts into a stringified value 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Converts an item into a stringified value. 18 | 19 | This is used internally by stackable functions when they are prepending or appending. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Prompt** 28 | 29 | 30 | 31 | 32 | |Type |Required|Position|PipelineInput| 33 | |----------|--------|--------|-------------| 34 | |`[Object]`|false |1 |false | 35 | 36 | 37 | 38 | 39 | 40 | --- 41 | -------------------------------------------------------------------------------- /docs/Posh/Input/get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Input.get_Current() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the value of a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current value of a stackable function. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Prompt.Current 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Input/set_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Input.set_Current() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the current implementation of a function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the current imlementation of a stackable function. 18 | 19 | Stackable functions keep a stack of all prior entries for easy undo. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $Posh.Prompt.Current = {"?"} 31 | ``` 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Abstract.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Abstract() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets abstract types. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets currently loaded abstract types. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Net.Abstract 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Assembly.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Assembly() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets loaded assemblies 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the currently loaded assemblies. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Assembly 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Assemblies 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Attribute.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Attribute() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets attribute types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded attribute types 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Attribute 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Attributes 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Cmdlet.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Cmdlet() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets cmdlet types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets .net types that are subclasses of Cmdlet. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Net.Cmdlet 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $posh.Net.Cmdlets 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Delegate.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Delegate() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets delegates 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded delegates. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Delegate 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Delegates 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Enum.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Enum() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets enumerated typed 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded enumerated types 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Enum 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Enums 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Exception.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Exception() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets exception types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded exception types 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Exception 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Exceptions 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_ExtensionType.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_ExtensionType() 2 | ---------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets .NET extension types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets .NET Extension Types. 18 | 19 | These types define extension methods for LINQ. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Generic.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Generic() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets generic types. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets currently loaded generic types. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Generic 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Generics 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Interface.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Interface() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all interfaces 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded interfaces 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Primitive.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Primitive() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets primitive types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all primitive types. 18 | 19 | Primitive types are used to build all other types. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $Posh.Net.Primitive 31 | ``` 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Private.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Private() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets private types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded private types 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Private 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Public.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Public() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets public types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded public types. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Public 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Static.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Static() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets static types. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets currently loaded static types. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Net.Abstract 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_Type.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_Type() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets loaded types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all currently loaded types. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Net.Type 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.Types 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_TypeAccelerator.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_TypeAccelerator() 2 | ------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets type accelerators 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets currently loaded type accelerators. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Net.TypeAccelerator 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $Posh.Net.TypeAccelerators 34 | ``` 35 | > EXAMPLE 3 36 | 37 | ```PowerShell 38 | $Posh.Net.Alias 39 | ``` 40 | > EXAMPLE 4 41 | 42 | ```PowerShell 43 | $Posh.Net.Aliases 44 | ``` 45 | 46 | 47 | --- 48 | -------------------------------------------------------------------------------- /docs/Posh/NET/get_ValueType.md: -------------------------------------------------------------------------------- 1 | Posh.NET.get_ValueType() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Value Types 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets currently loaded .NET value types 18 | 19 | (types that represent a single value) 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $posh.Net.ValueType 31 | ``` 32 | > EXAMPLE 2 33 | 34 | ```PowerShell 35 | $Posh.Net.ValueTypes 36 | ``` 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh/NET/set_TypeAccelerator.md: -------------------------------------------------------------------------------- 1 | Posh.NET.set_TypeAccelerator() 2 | ------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets type accelerators 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets type accelerators (aliases for types) 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Net.TypeAccelerator = @{'t'=[type]} 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $posh.Net.Alias = 't10', [type] 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/Posh/Parameters/Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Parameters.Clear() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears default parameter values. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears all default parameter values. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Parameters.Clear() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Parameters/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Parameters 2 | 3 | 4 | One of the strengths of PowerShell is how it treats parameters. 5 | 6 | You can find metadata about any command's parameters. 7 | 8 | You can also provide default values for any command's parameters. 9 | 10 | `$Posh.Parameters` helps you Find PowerShell parameters and manage their default values. 11 | ### Script Methods 12 | 13 | 14 | * [Clear](Clear.md) 15 | * [Remove](Remove.md) 16 | * [SetDefault](SetDefault.md) 17 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/get_All.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_All() 2 | -------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all items in an extension collection. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all items in a collection of extended commands. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/get_CommandType.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_CommandType() 2 | ---------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's CommandType 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the extended CommandTypes(s) that are stored in an extension collection. 18 | 19 | CommandTypes can be defined in a module's manifest. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/get_Count.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Count() 2 | ---------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the extension count. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the count of all extensions in a collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/get_Module.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Module() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the module that defines extended types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/get_Path.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Path() 2 | --------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an extension collection's Path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the Path(s) that store extensions in an extension collection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/get_Random.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.get_Random() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a random extended command 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets a random extended command from an ExtensionCollection. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/set_Module.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.set_Module() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the module that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Module** 26 | 27 | The module. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |----------------|--------|--------|-------------| 36 | |`[PSModuleInfo]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Collection/set_Path.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Collection.set_Path() 2 | --------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets an extension collection's path 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the path that defines extended command types in an extension collection. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **Path** 26 | 27 | The path. If this is empty, only extensions that are functions or aliases will be found. 28 | 29 | 30 | 31 | 32 | 33 | 34 | |Type |Required|Position|PipelineInput| 35 | |------------|--------|--------|-------------| 36 | |`[String[]]`|false |1 |false | 37 | 38 | 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Command/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Preset.Command 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [Use](Use.md) 8 | -------------------------------------------------------------------------------- /docs/Posh/Preset/Command/Use.md: -------------------------------------------------------------------------------- 1 | Posh.Preset.Command.Use() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Uses a preset 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Uses or applies a Posh preset. 18 | 19 | Posh presets will take the data in a *.preset.* file and apply it to a variable. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh/Profiles/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Profiles 2 | 3 | 4 | PowerShell has profiles! 5 | 6 | Profiles run whenever PowerShell is loaded. 7 | 8 | They're great if there's a module you want to always load, or a variable you always want defined. 9 | 10 | To see how to manipulate PowerShell profiles with Posh, use $posh.Profiles | Get-Member 11 | ### Script Methods 12 | 13 | 14 | * [Add](Add.md) 15 | * [ImportModule](ImportModule.md) 16 | * [Matches](Matches.md) 17 | * [New](New.md) 18 | * [Remove](Remove.md) 19 | * [RemoveModule](RemoveModule.md) 20 | * [Replace](Replace.md) 21 | * [get_Current](get_Current.md) 22 | * [get_Directory](get_Directory.md) 23 | * [get_File](get_File.md) 24 | * [get_Files](get_Files.md) 25 | -------------------------------------------------------------------------------- /docs/Posh/Profiles/get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_Current() 2 | --------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the current Profile 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current PowerShell Profile 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Profile.Current 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Profiles/get_Directory.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_Directory() 2 | ----------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the profile directory 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the PowerShell profile's directory. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Profile.Directory 29 | ``` 30 | 31 | 32 | --- 33 | 34 | 35 | ### Notes 36 | The Profile Directory is a wonderful place to store data. 37 | ( It is almost always writeable ) 38 | 39 | 40 | 41 | --- 42 | -------------------------------------------------------------------------------- /docs/Posh/Profiles/get_File.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_File() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the profile file 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the profile file for the current user in the current host. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Profile.File 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Profiles/get_Files.md: -------------------------------------------------------------------------------- 1 | Posh.Profiles.get_Files() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the profile files 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the FileInfo objects for each profile that exists. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Profile.Files 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/Append.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Append() 2 | -------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Appends content to a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Parameters 22 | #### **Value** 23 | 24 | The value to prepend. 25 | 26 | 27 | 28 | 29 | 30 | 31 | |Type |Required|Position|PipelineInput| 32 | |----------|--------|--------|-------------| 33 | |`[Object]`|false |1 |false | 34 | 35 | 36 | 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Clear() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears a stackable function, resetting it to it's original state. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Prompt.Clear() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/Pop.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Pop() 2 | ----------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pops the last value from a function stack 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pops the latest value from a function stack, such as the prompt. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Prompt.Pop() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/Prepend.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Prepend() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prepends content to a stackable function. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prepends content to a stackable function. 18 | 19 | This takes the current entry and adds content to it's beginning. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Value** 28 | 29 | The value to prepend. 30 | 31 | 32 | 33 | 34 | 35 | 36 | |Type |Required|Position|PipelineInput| 37 | |----------|--------|--------|-------------| 38 | |`[Object]`|false |1 |false | 39 | 40 | 41 | 42 | 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/Push.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Push() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pushes an entry into a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pushes an entry into a stackable function. 18 | 19 | This overwrites the existing entry, 20 | and adds the previous value to the stack so it can be easily undone. 21 | 22 | 23 | 24 | --- 25 | 26 | 27 | ### Parameters 28 | #### **Value** 29 | 30 | The new value for the function 31 | 32 | 33 | 34 | 35 | 36 | 37 | |Type |Required|Position|PipelineInput| 38 | |---------------|--------|--------|-------------| 39 | |`[ScriptBlock]`|false |1 |false | 40 | 41 | 42 | 43 | 44 | 45 | --- 46 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Prompt 2 | 3 | 4 | `prompt` is the function that is called before PowerShell prompts for input. 5 | 6 | $Posh.Prompt allows you to customize the PowerShell prompt. 7 | 8 | Prompts are a cool way to customize your shell. 9 | 10 | Pipe $Posh.Prompt to Get-Member to see what it can do. 11 | ### Script Methods 12 | 13 | 14 | * [Append](Append.md) 15 | * [Clear](Clear.md) 16 | * [Pop](Pop.md) 17 | * [Prepend](Prepend.md) 18 | * [Push](Push.md) 19 | * [Replace](Replace.md) 20 | * [Stringify](Stringify.md) 21 | * [get_Current](get_Current.md) 22 | * [set_Current](set_Current.md) 23 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/Stringify.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.Stringify() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Converts into a stringified value 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Converts an item into a stringified value. 18 | 19 | This is used internally by stackable functions when they are prepending or appending. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Prompt** 28 | 29 | 30 | 31 | 32 | |Type |Required|Position|PipelineInput| 33 | |----------|--------|--------|-------------| 34 | |`[Object]`|false |1 |false | 35 | 36 | 37 | 38 | 39 | 40 | --- 41 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.get_Current() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the value of a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current value of a stackable function. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Prompt.Current 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Prompt/set_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Prompt.set_Current() 2 | ------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the current implementation of a function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the current imlementation of a stackable function. 18 | 19 | Stackable functions keep a stack of all prior entries for easy undo. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $Posh.Prompt.Current = {"?"} 31 | ``` 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh/README.md: -------------------------------------------------------------------------------- 1 | ## Posh 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [get_Errors](get_Errors.md) 8 | * [get_History](get_History.md) 9 | * [get_Host](get_Host.md) 10 | * [get_Jobs](get_Jobs.md) 11 | * [get_Modules](get_Modules.md) 12 | * [get_Process](get_Process.md) 13 | * [get_Runspace](get_Runspace.md) 14 | -------------------------------------------------------------------------------- /docs/Posh/RSS/Article/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.RSS.Article 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [get_DatePublished](get_DatePublished.md) 8 | * [get_Name](get_Name.md) 9 | -------------------------------------------------------------------------------- /docs/Posh/RSS/Article/get_DatePublished.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Article.get_DatePublished() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an article's date published 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the date an article was published, as a `[DateTime]`. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.News.Article.DatePublished 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/RSS/Article/get_Name.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Article.get_Name() 2 | --------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets an article's name 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the name of an article in an RSS feed. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/RSS/Feed/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.RSS.Feed 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [get_Article](get_Article.md) 8 | * [get_Recent](get_Recent.md) 9 | -------------------------------------------------------------------------------- /docs/Posh/RSS/Feed/get_Article.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Feed.get_Article() 2 | --------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets articles in a feed. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the articles in a RSS feed. 18 | 19 | Articles will be cached for performance. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $Posh.News.Article # Get all articles from all feeds associated with Posh. 31 | ``` 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh/RSS/Feed/get_Recent.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.Feed.get_Recent() 2 | -------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets recent articles 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets recent articles in an RSS feed. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/RSS/FeedCollection/get_Feed.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_Feed() 2 | ---------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets feeds by name 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all feeds in a collection by name. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/RSS/FeedCollection/get_Random.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_Random() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a random feed 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets a random feed from a feed collection 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/RSS/FeedCollection/get_Recent.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_Recent() 2 | ------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets all recent articles 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets all recent articles in a feed collection, sorted by date published. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | How "Recent" is defined in the a feed collection's `.RecentDuration` property. 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/Posh/RSS/FeedCollection/get_RecentDuration.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.get_RecentDuration() 2 | -------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the duration considered recent 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the duration that is used to determine how recent an article is. 18 | 19 | By default, this is 45 days. 20 | 21 | 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /docs/Posh/RSS/FeedCollection/set_RecentDuration.md: -------------------------------------------------------------------------------- 1 | Posh.RSS.FeedCollection.set_RecentDuration() 2 | -------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the duration considered recent 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Set the duration that is used to determine how recent an article is. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Parameters 25 | #### **RecentDuration** 26 | 27 | 28 | 29 | 30 | |Type |Required|Position|PipelineInput| 31 | |------------|--------|--------|-------------| 32 | |`[TimeSpan]`|false |1 |false | 33 | 34 | 35 | 36 | 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /docs/Posh/Recommendation/Install.md: -------------------------------------------------------------------------------- 1 | Posh.Recommendation.Install() 2 | ----------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Installs the recommended module 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Uses Install-Module to install the recommended module. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/Recommendation/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Recommendation 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [Install](Install.md) 8 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/Append.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Append() 2 | ----------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Appends content to a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | 18 | --- 19 | 20 | 21 | ### Parameters 22 | #### **Value** 23 | 24 | The value to prepend. 25 | 26 | 27 | 28 | 29 | 30 | 31 | |Type |Required|Position|PipelineInput| 32 | |----------|--------|--------|-------------| 33 | |`[Object]`|false |1 |false | 34 | 35 | 36 | 37 | 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/Clear.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Clear() 2 | ---------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Clears a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Clears a stackable function, resetting it to it's original state. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Prompt.Clear() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/Pop.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Pop() 2 | -------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pops the last value from a function stack 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pops the latest value from a function stack, such as the prompt. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Prompt.Pop() 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/Prepend.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Prepend() 2 | ------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Prepends content to a stackable function. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Prepends content to a stackable function. 18 | 19 | This takes the current entry and adds content to it's beginning. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Value** 28 | 29 | The value to prepend. 30 | 31 | 32 | 33 | 34 | 35 | 36 | |Type |Required|Position|PipelineInput| 37 | |----------|--------|--------|-------------| 38 | |`[Object]`|false |1 |false | 39 | 40 | 41 | 42 | 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/Push.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Push() 2 | --------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Pushes an entry into a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Pushes an entry into a stackable function. 18 | 19 | This overwrites the existing entry, 20 | and adds the previous value to the stack so it can be easily undone. 21 | 22 | 23 | 24 | --- 25 | 26 | 27 | ### Parameters 28 | #### **Value** 29 | 30 | The new value for the function 31 | 32 | 33 | 34 | 35 | 36 | 37 | |Type |Required|Position|PipelineInput| 38 | |---------------|--------|--------|-------------| 39 | |`[ScriptBlock]`|false |1 |false | 40 | 41 | 42 | 43 | 44 | 45 | --- 46 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/README.md: -------------------------------------------------------------------------------- 1 | ## Posh.Stackable 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [Append](Append.md) 8 | * [Clear](Clear.md) 9 | * [Pop](Pop.md) 10 | * [Prepend](Prepend.md) 11 | * [Push](Push.md) 12 | * [Replace](Replace.md) 13 | * [Stringify](Stringify.md) 14 | * [get_Current](get_Current.md) 15 | * [set_Current](set_Current.md) 16 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/Stringify.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.Stringify() 2 | -------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Converts into a stringified value 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Converts an item into a stringified value. 18 | 19 | This is used internally by stackable functions when they are prepending or appending. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Parameters 27 | #### **Prompt** 28 | 29 | 30 | 31 | 32 | |Type |Required|Position|PipelineInput| 33 | |----------|--------|--------|-------------| 34 | |`[Object]`|false |1 |false | 35 | 36 | 37 | 38 | 39 | 40 | --- 41 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/get_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.get_Current() 2 | ---------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the value of a stackable function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current value of a stackable function. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Prompt.Current 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/Stackable/set_Current.md: -------------------------------------------------------------------------------- 1 | Posh.Stackable.set_Current() 2 | ---------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Sets the current implementation of a function 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Sets the current imlementation of a stackable function. 18 | 19 | Stackable functions keep a stack of all prior entries for easy undo. 20 | 21 | 22 | 23 | --- 24 | 25 | 26 | ### Examples 27 | > EXAMPLE 1 28 | 29 | ```PowerShell 30 | $Posh.Prompt.Current = {"?"} 31 | ``` 32 | 33 | 34 | --- 35 | -------------------------------------------------------------------------------- /docs/Posh/get_Errors.md: -------------------------------------------------------------------------------- 1 | Posh.get_Errors() 2 | ----------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Returns all errors 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Returns all errors from the current session 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $Posh.Errors 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/get_History.md: -------------------------------------------------------------------------------- 1 | Posh.get_History() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell History 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the history of commands run in this PowerShell session. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Related Links 25 | * [Get-History](https://learn.microsoft.com/powershell/module/Microsoft.PowerShell.Core/Get-History) 26 | 27 | 28 | 29 | 30 | 31 | --- 32 | 33 | 34 | ### Examples 35 | > EXAMPLE 1 36 | 37 | ```PowerShell 38 | $posh.History 39 | ``` 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/Posh/get_Host.md: -------------------------------------------------------------------------------- 1 | Posh.get_Host() 2 | --------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell Host 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current PowerShell Host 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Host 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/get_Jobs.md: -------------------------------------------------------------------------------- 1 | Posh.get_Jobs() 2 | --------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets PowerShell Jobs 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets PowerShell Background Jobs 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Related Links 25 | * [Get-Job](https://learn.microsoft.com/powershell/module/Microsoft.PowerShell.Core/Get-Job) 26 | 27 | 28 | 29 | * [Start-Job](https://learn.microsoft.com/powershell/module/Microsoft.PowerShell.Core/Start-Job) 30 | 31 | 32 | 33 | 34 | 35 | --- 36 | 37 | 38 | ### Examples 39 | > EXAMPLE 1 40 | 41 | ```PowerShell 42 | $posh.Jobs 43 | ``` 44 | 45 | 46 | --- 47 | -------------------------------------------------------------------------------- /docs/Posh/get_Modules.md: -------------------------------------------------------------------------------- 1 | Posh.get_Modules() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the loaded modules 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the PowerShell modules loaded in the current session. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/Posh/get_Process.md: -------------------------------------------------------------------------------- 1 | Posh.get_Process() 2 | ------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell Process 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the process currently hosting PowerShell 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Process 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/Posh/get_Runspace.md: -------------------------------------------------------------------------------- 1 | Posh.get_Runspace() 2 | ------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the PowerShell Runspaces 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the current PowerShell Runspace. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Runspace 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Demo.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Demo() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets module demos 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets demo files related to a module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Related Links 25 | * [https://github.com/StartAutomating/ShowDemo](https://github.com/StartAutomating/ShowDemo) 26 | 27 | 28 | 29 | 30 | 31 | --- 32 | 33 | 34 | ### Examples 35 | #### EXAMPLE 1 36 | ```PowerShell 37 | $Posh.Demos 38 | ``` 39 | 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Discussion.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Discussion() 2 | ---------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a module's discussions URL. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the discussions URL related to a module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing. 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Issue.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Issue() 2 | ----------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a module's issue URL. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the issues URL related to a module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing. 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Link.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Link() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Links 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists hyperlinks from this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Links 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Logo.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Logo() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Logos 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists logos for this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Logos 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_News.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_News() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a Module's News 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists RSS NewsFeeds from this module 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.News 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Preset.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Preset() 2 | ------------------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Get's a module's presets 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets presets from a module. 18 | 19 | Any module can contain `*.preset(s)` files, of the extensions: 20 | 21 | * .psd1 22 | * .json 23 | * .clixml 24 | 25 | The collection of presets can be accessed in a Module's .Preset(s) properties 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_README.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_README() 2 | ------------------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a Module's README 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the content of README.md file located at the module root. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Recommendation.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Recommendation() 2 | -------------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Recommendations 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists other modules this module recommends. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | # $Posh.Recommends gets every loaded module's recommendations. 28 | $posh.Recommends 29 | ``` 30 | 31 | #### EXAMPLE 2 32 | ```PowerShell 33 | $posh.Recommendations 34 | ``` 35 | 36 | 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Screenshot.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Screenshot() 2 | ---------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Screenshots 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists screenshots from this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Screenshots 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Test.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Test() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets module tests 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets Pester Tests located within a module. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Tip.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Tip() 2 | --------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Get's a module's tips 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets tips and tricks from a module. 18 | 19 | Any module can contain `*.tip(s)` or `*.trick(s)` files, of the extensions: 20 | 21 | * .md 22 | * .txt 23 | * .ps1 24 | * .psd1 25 | * .json 26 | * .clixml 27 | 28 | The collection of tips can be accessed in a Module's .Tip(s) or .Trick(s) properties 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.Management.Automation.PSModuleInfo.get_Video.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Video() 2 | ----------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Videos 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists videos about this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | $posh.Videos 28 | ``` 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System.TimeZoneInfo.get_LocalTime.md: -------------------------------------------------------------------------------- 1 | System.TimeZoneInfo.get_LocalTime() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the local time 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the local time for a timezone. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | #### EXAMPLE 1 26 | ```PowerShell 27 | Get-TimeZone -ListAvailable 28 | ``` 29 | 30 | #### EXAMPLE 2 31 | ```PowerShell 32 | Get-TimeZone | Select LocalTime 33 | ``` 34 | 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Demo.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Demo() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets module demos 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets demo files related to a module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Related Links 25 | * [https://github.com/StartAutomating/ShowDemo](https://github.com/StartAutomating/ShowDemo) 26 | 27 | 28 | 29 | 30 | 31 | --- 32 | 33 | 34 | ### Examples 35 | > EXAMPLE 1 36 | 37 | ```PowerShell 38 | $Posh.Demos 39 | ``` 40 | 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Discussion.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Discussion() 2 | ---------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a module's discussions URL. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the discussions URL related to a module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing. 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Issue.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Issue() 2 | ----------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a module's issue URL. 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the issues URL related to a module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Notes 25 | The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing. 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Link.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Link() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Links 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists hyperlinks from this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Links 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Logo.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Logo() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Logos 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists logos for this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Logos 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_ModuleProfile.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_ModuleProfile() 2 | ------------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a Module's Profile 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the profile file associated with the module. 18 | 19 | Any module can have a file within the same directory as $profile, named `$($this.Name).profile.ps1`. 20 | 21 | This file may be loaded when the module loads, or anytime thereafter. 22 | 23 | 24 | 25 | --- 26 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_ModuleProfiles.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_ModuleProfiles() 2 | -------------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a Module's Profiles 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the profile files associated with the module. 18 | 19 | Any module can have a file within the same directory any valid $profile location, named `$($this.Name).profile.ps1`. 20 | 21 | This file may be loaded when the module loads, or anytime thereafter. 22 | 23 | 24 | 25 | --- 26 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_News.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_News() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a Module's News 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists RSS NewsFeeds from this module 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.News 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Presentation.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Presentation() 2 | ------------------------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets module presentations 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets PowerPoint presentations and templates located within a PowerShell module. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Preset.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Preset() 2 | ------------------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Get's a module's presets 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets presets from a module. 18 | 19 | Any module can contain `*.preset(s)` files, of the extensions: 20 | 21 | * .psd1 22 | * .json 23 | * .clixml 24 | 25 | The collection of presets can be accessed in a Module's .Preset(s) properties 26 | 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_README.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_README() 2 | ------------------------------------------------------ 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets a Module's README 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the content of README.md file located at the module root. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Recommendation.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Recommendation() 2 | -------------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Recommendations 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists other modules this module recommends. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | $Posh.Recommends gets every loaded module's recommendations. 26 | 27 | ```PowerShell 28 | $posh.Recommends 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | $posh.Recommendations 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Screenshot.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Screenshot() 2 | ---------------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Screenshots 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists screenshots from this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Screenshots 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Test.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Test() 2 | ---------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets module tests 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets Pester Tests located within a module. 18 | 19 | 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Tip.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Tip() 2 | --------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Get's a module's tips 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets tips and tricks from a module. 18 | 19 | Any module can contain `*.tip(s)` or `*.trick(s)` files, of the extensions: 20 | 21 | * .md 22 | * .txt 23 | * .ps1 24 | * .psd1 25 | * .json 26 | * .clixml 27 | 28 | The collection of tips can be accessed in a Module's .Tip(s) or .Trick(s) properties 29 | 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System/Management/Automation/PSModuleInfo/get_Video.md: -------------------------------------------------------------------------------- 1 | System.Management.Automation.PSModuleInfo.get_Video() 2 | ----------------------------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets Module Videos 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Lists videos about this module. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | $posh.Videos 29 | ``` 30 | 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/System/TimeZoneInfo/README.md: -------------------------------------------------------------------------------- 1 | ## System.TimeZoneInfo 2 | 3 | 4 | ### Script Methods 5 | 6 | 7 | * [get_LocalTime](get_LocalTime.md) 8 | -------------------------------------------------------------------------------- /docs/System/TimeZoneInfo/get_LocalTime.md: -------------------------------------------------------------------------------- 1 | System.TimeZoneInfo.get_LocalTime() 2 | ----------------------------------- 3 | 4 | 5 | 6 | 7 | ### Synopsis 8 | Gets the local time 9 | 10 | 11 | 12 | --- 13 | 14 | 15 | ### Description 16 | 17 | Gets the local time for a timezone. 18 | 19 | 20 | 21 | --- 22 | 23 | 24 | ### Examples 25 | > EXAMPLE 1 26 | 27 | ```PowerShell 28 | Get-TimeZone -ListAvailable 29 | ``` 30 | > EXAMPLE 2 31 | 32 | ```PowerShell 33 | Get-TimeZone | Select LocalTime 34 | ``` 35 | 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | permalink: pretty 2 | --------------------------------------------------------------------------------