{"id":3927,"date":"2023-08-12T21:17:20","date_gmt":"2023-08-12T21:17:20","guid":{"rendered":"https:\/\/wiki.thomasandsofia.com\/?p=3927"},"modified":"2023-08-12T21:18:19","modified_gmt":"2023-08-12T21:18:19","slug":"into-to-powershell-2-getting-started-with-powershell","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=3927","title":{"rendered":"Into to PowerShell &#8211; 2 Getting Started with PowerShell"},"content":{"rendered":"<h3>Get a list of commands<\/h3>\n<pre>get-command<\/pre>\n<ul>\n<li>Commandlets (Cmdlet): Native Powershell commands written in .Net<\/li>\n<li>Functions: Written in PowerShell scripting language<\/li>\n<li>Help: <code>help &lt;command&gt; &lt;-examples&gt;<\/code><\/li>\n<li>Aliases: <code>get-alias<\/code><\/li>\n<\/ul>\n<h3>PowerShell Run Modes<\/h3>\n<ul>\n<li>Normal Mode: Ability to run some commands could be limited<\/li>\n<li>Administrator Mode: Ability to run any command<\/li>\n<\/ul>\n<h4>Bit Modes<\/h4>\n<p>PowerShell &amp; PowerShell ISE = 64 bit<br \/>\nPowerShell x86 &amp; PowerShell ISE x86 = 32 bit<\/p>\n<p>Customize: Click PowerShell Icon in top left<\/p>\n<h3>Run Historical Commands<\/h3>\n<ul>\n<li>get-history: view previous commands<\/li>\n<li>invoke-history &lt;command number&gt; &lt;; next command number&gt;<\/li>\n<li>clear-history: delete history log\n<ul>\n<li>This does not remove them from the up\/down arrow access<\/li>\n<li>press &lt;Alt&gt;S+&lt;Alt&gt;M to create a new session to completely remove the history\n<ul>\n<li>History only lasts as long as the session lasts.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Auto Complete<\/h4>\n<ul>\n<li>Start entering and press [Tab] to complete<\/li>\n<li>[Shift]+[Tab] cycles backwards<\/li>\n<\/ul>\n<h3>Services<\/h3>\n<ul>\n<li>View running services: <code>get-service<\/code><\/li>\n<li>View a specific service: <code>get-service -Name &lt;Service Name&gt;<\/code>\n<ul>\n<li>Hint: Pressing [Tab] after &#8216;-&#8216; will default to &#8216;Name&#8217;<\/li>\n<\/ul>\n<\/li>\n<li>Start a service: <code>start-service -Name &lt;Service Name&gt;<\/code><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>PowerShell ISE<\/h3>\n<p>PowerShell script extensions are always .ps1<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get a list of commands get-command Commandlets (Cmdlet): Native Powershell commands written in .Net Functions: Written in PowerShell scripting language Help: help &lt;command&gt; &lt;-examples&gt; Aliases: get-alias PowerShell Run Modes Normal Mode: Ability to run some commands could be limited Administrator Mode: Ability to run any command Bit Modes PowerShell &amp; PowerShell ISE = 64 bit ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=3927\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82,83],"tags":[],"class_list":["post-3927","post","type-post","status-publish","format-standard","hentry","category-powershell","category-programming"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3927"}],"version-history":[{"count":2,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3927\/revisions"}],"predecessor-version":[{"id":3929,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3927\/revisions\/3929"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}