{"id":43426,"date":"2021-08-27T12:15:00","date_gmt":"2021-08-27T04:15:00","guid":{"rendered":"https:\/\/version-2.com\/?p=43426"},"modified":"2022-02-07T16:38:11","modified_gmt":"2022-02-07T08:38:11","slug":"powershell-101-lets-get-to-know-its-use-and-main-commands","status":"publish","type":"post","link":"https:\/\/version-2.com\/zh\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/","title":{"rendered":"PowerShell 101: let\u2019s get to know its use and main commands"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"43426\" class=\"elementor elementor-43426\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4da8c5f9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4da8c5f9\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;decf9c3&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-133ba185\" data-id=\"133ba185\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fc2da8d post-content elementor-widget elementor-widget-text-editor\" data-id=\"fc2da8d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p align=\"center\"><img decoding=\"async\" src=\"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg\" alt=\"\" width=\"958\" height=\"auto\"><\/p>\n\n<h2>PowerShell 101: an alternative to command line on Linux and Mac<\/h2>\n<p>The Command Line Interface (CLI) in Windows\u00ae exists and resists the passage of time, from those distant days of MS-DOS\u00ae to the current PowerShell 101. Let\u2019s see the basic PowerShell.<\/p>\n<p>When I went to college in the 1980s, proprietary software reigned. The old German computers with Unix\u00ae that printed our schedules were being replaced by \u201cmodern\u201d personal computers. The Microsoft\u00ae software house \u2013 at that time \u2013 was tied to MS-DOS\u00ae, so we learned to use the commands: dir, cls, format for our floppy disks\u2026<\/p>\n<p>A little over a decade ago, back in Redmond they decided to dust off, modernize and empower the CLI. Born as Monad\u00ae, renamed PowerShell\u00ae, today we present you with the basic PowerShell or PowerShell 101.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-basico-1.png\" alt=\"powershell 101 1\"><\/p>\n<p><em>Description: Basic Powershell \u2013 Logo<br>\n(Wikipedia <a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:PowerShell_5.0_icon.png\" rel=\"nofollow\">https:\/\/commons.wikimedia.org\/wiki\/File:PowerShell_5.0_icon.png<\/a>)<\/em><\/p>\n<h3>Basic PowerShell<\/h3>\n<p>The Linux operating system has been going on strong; there are many articles in Pandora FMS blog about it. Also in the monitoring of proprietary systems we are always present; Windows\u00ae, as its maximum exponent. And every time a new version comes out we\u2019re there, testing and checking.<\/p>\n<p>I think, because of this Linux thing, Microsoft decided to make a compilation of tools along with new concepts, as a counterpart to the GNU features that come with Linux. Considering that PowerShell Core exists since 2016 as open software (MIT license) but with Windows\u00ae proprietary components, now we have it available in Ubuntu, CentOS (the OS recommended for Pandora FMS) and macOS and even in another hardware architecture such as ARM.<\/p>\n<h3>Installing PowerShell Core at Linux<\/h3>\n<p>In Ubuntu we must install the package manager snap: with sudo apt install snap we will achieve our mission. Next we\u2019ll run snap install powershell -classic<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-basico-2.jpg\" alt=\"powershell 101 2\"><\/p>\n<p><em>Description: snap install powershell \u2013 classic<\/em><\/p>\n<h3>First commands<\/h3>\n<p>Having launched with the command pwsh (in Windows\u00ae we should look for powershell.exe), we will have a terminal window, with \u201cPS\u201d of indicative (prompt) followed by the location of the directory. In both environments the aspect is very similar, so we will generalize from now on.<\/p>\n<p>Then let\u2019s put our memory into practice:<\/p>\n<ul>\n<li><strong>cls<\/strong>: \u201cclears\u201d the screen, leaving space to execute a new cycle of commands. It\u2019s not necessary at all, but it\u2019s similar to writing with chalk on a blackboard and erasing to begin to explain another subject.<\/li>\n<li><strong>dir -ad:<\/strong> to list directories only.<\/li>\n<li><strong>echo message<\/strong>: when we want to show specific text on the screen. This doesn\u2019t seem to be useful, but when we integrate it in a script it is of tremendous utility to indicate the progress of some task or the result of the same one.<\/li>\n<\/ul>\n<p>We won\u2019t delay any longer with the old MS-DOS commands. In the twenty-first century, we would need to continue using such old technology, and in the process with those old programs that communicated or interacted with text strings (STDIN, STDOUT).<\/p>\n<h3>Basic Command-let in PowerShell 101<\/h3>\n<p>In the 21st century everything is more complex, they are years of accumulated experience. PowerShell 101 is not a simple tool like the one we use in Linux. For this tool there are command-let and its name is abbreviated as cmdlet. This means that the commands we tested are not really the ones we thought they were: they are aliases of the default cmdlet and this allows backward compatibility. Now, there\u2019s more. Let\u2019s analyse the case of the command date, used to remunerate the date.<\/p>\n<p>Its real name is Get-Date and although it returns in a slightly different format the current date and time to that of the alias, basically both do the same thing. For monitoring tasks we need to deliver that value in a very specific format: this is when the cmdlets do their job in a totally different way.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-basico-3.jpg\" alt=\"powershell 101 3\"><\/p>\n<p><em>Description: \u00abWorking with cmdlet with date and time variables\u00bb<\/em><\/p>\n<p>With the cmdlet Get-Date we can:<\/p>\n<ul>\n<li>Display the date of the computer.<\/li>\n<li>Display it in a custom format.<\/li>\n<li>Use methods; in this case we visualize what day number is the date May 20, 2019 (it is the 140th day of the year).<\/li>\n<li>Save a date variable in a custom format.<\/li>\n<li>Convert this variable to a text string and save it in a file.<\/li>\n<li>Notice that we have used the pipe to communicate one cmdlet with another. The cmdlet you receive used to write to disk is called Add-Content. (Don\u2019t you remember Linux?).<\/li>\n<li>The reading counterpart is Get-Content and its alias is called\u2026 \u201ccat\u201d, just like the one used in Linux to list the contents of a text file!<\/li>\n<\/ul>\n<p>Take a pause, check this before moving on to the next point.<\/p>\n<h3>Working with cmdlet<\/h3>\n<p>With all this as a base, we can stop thinking of basic Powershell as a tool and start evoking it as a toolbox. To do this we will use the Get-Command command:<\/p>\n<p>Using it without any parameter will give us back a lot of tools; the ones we have installed in our computer.<\/p>\n<p>If we inquire about a particular command, for example Get-Command Get-Date will return information about the command type, name, version and source (the library it belongs to). For Get-Date it will indicate that it is a cmdlet belonging to Microsoft.PowerShell.Utility and for Clear-Host (clear screen, cls) that it is simply a function. Entering an alias will return the original cmdlet or function.<\/p>\n<p>If we don\u2019t remember the name exactly we\u2019ll use wildcards; for example, with Get-Command *date* we\u2019ll get a list of all the commands that contain that string.<\/p>\n<h3>Help with basic Powershell<\/h3>\n<p>The help was also thought as a repository, since with the Get-Help command we can also download content to our computer:<\/p>\n<ul>\n<li><strong>Get-Help Get-Date<\/strong>: will show complete information about how to use Get-Date, its syntax, its aliases, etc.<\/li>\n<li><strong>Get-Help Get-Date -Online<\/strong>: will open an instance of our web browser and open the latest online information about the Get-Date command.<br>\nTo work offline, i.e. to save the updated help: Update-Help.<\/li>\n<\/ul>\n<p>Using Get-Help, let\u2019s learn about the commands Get-Location and Set-Location.<\/p>\n<p>Let\u2019s suppose we have to create a folder or a file; for this we will no longer use the command md or mkdir (the latter is written exactly the same in Linux) but we will use the New-Item command:<\/p>\n<p><em>New-Item \u201cpath\/name\u201d -type directory<\/em><\/p>\n<p>New-item Command.<\/p>\n<p>\u201cpath\/name\u201d of the directory; quotation marks are required when interspersed.<\/p>\n<p>Parameter -type and then what we have installed as provider: File, Directory, SymbolicLink, Junction or HardLink<\/p>\n<p>Now let\u2019s talk about providers: we can download the providers we need or <strong>we can create our own providers and associate them to the command<\/strong>. My imagination flies: we develop a program that acts as an FTP client and we offer it as a provider so we can sell it to anyone to integrate it into their PowerShell\u2026 but wait, there is more. If we do this in turn -if our license allows it- our client can add our FTP program as a library to their own projects. What do you think?<\/p>\n<p>Note: PowerShell is also able to work via API and even security analysts have created their own PowerShell environments, some mixed with Python language\u2026 who don\u2019t even need Microsoft executable files!<\/p>\n<h3>Pandora FMS and monitoring tasks<\/h3>\n<p>Pandora FMS flexibility allows us to use PowerShell to quickly access complex commands. For example, in Windows environment we need to know which patches are installed:<\/p>\n<p><em>Get-CimInstance -ClassName Win32_QuickFixEngineering -ComputerName <\/em><\/p>\n<p>We will be able to visualize the components with the Get-Member command, extract the contents and make our complement in Pandora FMS for PowerShell!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8085a61 post-content elementor-widget elementor-widget-shortcode\" data-id=\"8085a61\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\t\t<div data-elementor-type=\"page\" data-elementor-id=\"18103\" class=\"elementor elementor-18103\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-748947f elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"748947f\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;c4f773e&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7995c19\" data-id=\"7995c19\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a437045 elementor-widget elementor-widget-image-box\" data-id=\"a437045\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">About Version 2 Digital<\/h3><p class=\"elementor-image-box-description\">Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.\n<br><br>\nThrough an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n\t\t<div data-elementor-type=\"page\" data-elementor-id=\"38636\" class=\"elementor elementor-38636\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7400e5a2 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"7400e5a2\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;_id&quot;:&quot;58112d0&quot;,&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-131f5cf2\" data-id=\"131f5cf2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1114ae95 elementor-widget elementor-widget-text-editor\" data-id=\"1114ae95\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>About PandoraFMS<\/strong><br>\nPandora FMS is a flexible monitoring system, capable of monitoring devices, infrastructures, applications, services and business processes.<br>\nOf course, one of the things that Pandora FMS can control is the hard disks of your computers.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>PowerShell 101: an alternative to command line on Linux [&hellip;]<\/p>\n","protected":false},"author":143524195,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[461,474,61],"tags":[462,475],"class_list":["post-43426","post","type-post","status-publish","format-standard","hentry","category-year2021","category-pandorafms","category-press-release","tag-462","tag-pandorafms"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PowerShell 101: let\u2019s get to know its use and main commands - Version 2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/version-2.com\/zh\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/\" \/>\n<meta property=\"og:locale\" content=\"zh_HK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell 101: let\u2019s get to know its use and main commands - Version 2\" \/>\n<meta property=\"og:description\" content=\"PowerShell 101: an alternative to command line on Linux [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/version-2.com\/zh\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Version 2\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-27T04:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-07T08:38:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg\" \/>\n<meta name=\"author\" content=\"version2hk\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"version2hk\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u8a08\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/\"},\"author\":{\"name\":\"version2hk\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/person\\\/d14d2d3cd77ffdb618b9f1330fe084db\"},\"headline\":\"PowerShell 101: let\u2019s get to know its use and main commands\",\"datePublished\":\"2021-08-27T04:15:00+00:00\",\"dateModified\":\"2022-02-07T08:38:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/\"},\"wordCount\":1281,\"publisher\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pandorafms.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/powershell-101-featured.jpg\",\"keywords\":[\"2021\",\"Pandorafms\"],\"articleSection\":[\"2021\",\"PandoraFMS\",\"Press Release\"],\"inLanguage\":\"zh-HK\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/\",\"url\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/\",\"name\":\"PowerShell 101: let\u2019s get to know its use and main commands - Version 2\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pandorafms.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/powershell-101-featured.jpg\",\"datePublished\":\"2021-08-27T04:15:00+00:00\",\"dateModified\":\"2022-02-07T08:38:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#breadcrumb\"},\"inLanguage\":\"zh-HK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#primaryimage\",\"url\":\"https:\\\/\\\/pandorafms.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/powershell-101-featured.jpg\",\"contentUrl\":\"https:\\\/\\\/pandorafms.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/powershell-101-featured.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/version-2.com\\\/2021\\\/08\\\/powershell-101-lets-get-to-know-its-use-and-main-commands\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell 101: let\u2019s get to know its use and main commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#website\",\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\",\"name\":\"Version 2\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/version-2.com\\\/zh\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-HK\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\",\"name\":\"Version 2\",\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/version-2.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/version-2.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1\",\"width\":1795,\"height\":335,\"caption\":\"Version 2\"},\"image\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/person\\\/d14d2d3cd77ffdb618b9f1330fe084db\",\"name\":\"version2hk\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d280627252b42d7489de74dd88aa04043a495f25e258575000dc767e287bf94c?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d280627252b42d7489de74dd88aa04043a495f25e258575000dc767e287bf94c?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d280627252b42d7489de74dd88aa04043a495f25e258575000dc767e287bf94c?s=96&d=identicon&r=g\",\"caption\":\"version2hk\"},\"sameAs\":[\"http:\\\/\\\/version2xfortcom.wordpress.com\"],\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/author\\\/version2hk\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PowerShell 101: let\u2019s get to know its use and main commands - Version 2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/version-2.com\/zh\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/","og_locale":"zh_HK","og_type":"article","og_title":"PowerShell 101: let\u2019s get to know its use and main commands - Version 2","og_description":"PowerShell 101: an alternative to command line on Linux [&hellip;]","og_url":"https:\/\/version-2.com\/zh\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/","og_site_name":"Version 2","article_published_time":"2021-08-27T04:15:00+00:00","article_modified_time":"2022-02-07T08:38:11+00:00","og_image":[{"url":"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg","type":"","width":"","height":""}],"author":"version2hk","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"version2hk","\u9810\u8a08\u95b1\u8b80\u6642\u9593":"6 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#article","isPartOf":{"@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/"},"author":{"name":"version2hk","@id":"https:\/\/version-2.com\/zh\/#\/schema\/person\/d14d2d3cd77ffdb618b9f1330fe084db"},"headline":"PowerShell 101: let\u2019s get to know its use and main commands","datePublished":"2021-08-27T04:15:00+00:00","dateModified":"2022-02-07T08:38:11+00:00","mainEntityOfPage":{"@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/"},"wordCount":1281,"publisher":{"@id":"https:\/\/version-2.com\/zh\/#organization"},"image":{"@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg","keywords":["2021","Pandorafms"],"articleSection":["2021","PandoraFMS","Press Release"],"inLanguage":"zh-HK"},{"@type":"WebPage","@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/","url":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/","name":"PowerShell 101: let\u2019s get to know its use and main commands - Version 2","isPartOf":{"@id":"https:\/\/version-2.com\/zh\/#website"},"primaryImageOfPage":{"@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#primaryimage"},"image":{"@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg","datePublished":"2021-08-27T04:15:00+00:00","dateModified":"2022-02-07T08:38:11+00:00","breadcrumb":{"@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#breadcrumb"},"inLanguage":"zh-HK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/"]}]},{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#primaryimage","url":"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg","contentUrl":"https:\/\/pandorafms.com\/blog\/wp-content\/uploads\/2019\/09\/powershell-101-featured.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/version-2.com\/2021\/08\/powershell-101-lets-get-to-know-its-use-and-main-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/version-2.com\/zh\/"},{"@type":"ListItem","position":2,"name":"PowerShell 101: let\u2019s get to know its use and main commands"}]},{"@type":"WebSite","@id":"https:\/\/version-2.com\/zh\/#website","url":"https:\/\/version-2.com\/zh\/","name":"Version 2","description":"","publisher":{"@id":"https:\/\/version-2.com\/zh\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/version-2.com\/zh\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-HK"},{"@type":"Organization","@id":"https:\/\/version-2.com\/zh\/#organization","name":"Version 2","url":"https:\/\/version-2.com\/zh\/","logo":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/version-2.com\/zh\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/version-2.com\/wp-content\/uploads\/2020\/08\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1","contentUrl":"https:\/\/i0.wp.com\/version-2.com\/wp-content\/uploads\/2020\/08\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1","width":1795,"height":335,"caption":"Version 2"},"image":{"@id":"https:\/\/version-2.com\/zh\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/version-2.com\/zh\/#\/schema\/person\/d14d2d3cd77ffdb618b9f1330fe084db","name":"version2hk","image":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/secure.gravatar.com\/avatar\/d280627252b42d7489de74dd88aa04043a495f25e258575000dc767e287bf94c?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d280627252b42d7489de74dd88aa04043a495f25e258575000dc767e287bf94c?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d280627252b42d7489de74dd88aa04043a495f25e258575000dc767e287bf94c?s=96&d=identicon&r=g","caption":"version2hk"},"sameAs":["http:\/\/version2xfortcom.wordpress.com"],"url":"https:\/\/version-2.com\/zh\/author\/version2hk\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbQRKm-biq","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts\/43426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/users\/143524195"}],"replies":[{"embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/comments?post=43426"}],"version-history":[{"count":5,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts\/43426\/revisions"}],"predecessor-version":[{"id":43431,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts\/43426\/revisions\/43431"}],"wp:attachment":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/media?parent=43426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/categories?post=43426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/tags?post=43426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}