zoukankan      html  css  js  c++  java
  • 什么是automatic variable?

    看代码符号$?搞不清楚是什么?

     

    看代码.

    $share = Get-WmiObject -Class Win32_Share -ComputerName $Server.name -Credential $credentials -Filter "Description='Default share'"
    
    if($?)
    {
       "command succeeded"
       $share | Foreach-Object {...}
    }
    else
    {
       "command failed"
    }

     

    找到定义如下:

    Contains the execution status of the last operation. It contains TRUE if the last operation succeeded and FALSE if it failed.

     

    Reference

    ==================

    about_Automatic_Variables

    https://technet.microsoft.com/en-us/library/hh847768.aspx

  • 相关阅读:
    邪恶的强制数据转换
    知识普及
    判断是否为一个数字
    parseInt
    webpack学习记录
    数组隐藏属性
    elasticSearch基本使用
    elasticsearch安装和部署
    neo4j索引
    spark yarn 提交作业
  • 原文地址:https://www.cnblogs.com/awpatp/p/5773465.html
Copyright © 2011-2022 走看看