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

 

看代码.

$share = Get-WmiObject -Class Win32_Share -ComputerName $Server.name -Credential $credentials -Filter "Description='Default share'"

if($?)
{
"command succeeded"
$share | Foreach-Object {...}
}
else
{
"command failed"
}

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

找到定义如下:

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

什么是automatic variable?的更多相关文章

  1. Python中变量的作用域(variable scope)

    http://www.crifan.com/summary_python_variable_effective_scope/ 解释python中变量的作用域 示例: 1.代码版 #!/usr/bin/ ...

  2. PowerShell Notes

    1.  概要 - PowerShell 是cmdlet(command-let)的指令集合,类似unix的bash. - IDE: Windows PowerShell ISE,不区分大小写,可以用命 ...

  3. 从汇编角度分析C语言的过程调用

    ➠更多技术干货请戳:听云博客 基本术语定义 1.系统栈(system stack)是一个内存区,位于进程地址空间的末端. 2.在将数据压栈时,栈是自顶向下增长的,该内存区用于函数的局部变量提供内存.它 ...

  4. Linux中exit与_exit的区别

    在exit,_exit的区别 - exit()与_exit()函数的区别(Linux系统中)2012-03-20 15:19:53 分类: LINUX 注:exit()就是退出,传入的参数是程序退出时 ...

  5. 转载-------makefile 使用总结

    转载自:http://www.cnblogs.com/wang_yb/p/3990952.html 1. Makefile 简介 Makefile 是和 make 命令一起配合使用的. 很多大型项目的 ...

  6. makfile

    1. Makefile 简介 Makefile 是和 make 命令一起配合使用的. 很多大型项目的编译都是通过 Makefile 来组织的, 如果没有 Makefile, 那很多项目中各种库和代码之 ...

  7. Thinking in Java--笔记(2)

    Everything Is an Object You manipulate objects with references Each programming language has its own ...

  8. [转]http://makefiletutorial.com/

    Intro This makefile will always run. The default target is some_binary, because it is first. some_bi ...

  9. GCC中文手册

    GCC 1 NAME gcc,g++-GNU工程的C和C++编译器(egcs-1.1.2) 总览(SYNOPSIS) gcc[option|filename ]... g++[option|filen ...

随机推荐

  1. ng中的过滤器

    angular中对输出的值提供过滤器,用法如下: {{name | currency:"¥"}}</p> 这是在在html中的用法,用 | 来添加过滤器,过滤器后面通过 ...

  2. EhReport ,CReport改进版本,再次改进 ,V1.31

    取消了xlgrid依赖,带齐了第三方包. 安装更加方便. For D7 下载源码

  3. php匹配中文代码(字符串中包含中文或者全是中文)

    <?php$str= "中文";//全部是汉字的$par = "\x80-\xff";$par2= chr(0xa1).'-'.chr(0xff);//包 ...

  4. 水果项目第1集-想法>需求->功能->数据库设计->类设计

    懒,懒人,我是个懒人. 懒人想做点事,总是拖拖拉拉,迟迟没有开始. 很久很久以前,就想做属于自己的产品,但是至今还没有一个属于自己的产品. 两年前,终于想好,要做一个网上卖水果的系统,手机上点点,水果 ...

  5. css3之转换

    1.2D转换 2.3D转换 transform-style属性(设置三维/二维效果) 值: flat表示子元素不保留3D设置(默认) preserve-3d表示子元素保留3D设置 transform属 ...

  6. 基本套接字编程(3) -- select篇

    1. I/O复用 我们学习了I/o复用的基本知识,了解到目前支持I/O复用的系统调用有select.pselect.poll.epoll.而epoll技术以其独特的优势被越来越多的应用到各大企业服务器 ...

  7. LeetCode(84) Largest Rectangle in Histogram

    题目 Given n non-negative integers representing the histogram’s bar height where the width of each bar ...

  8. 关于CSS3的代码总结(部分)

    1. 构造样式表:selector{ Property:value; Property:value; } Selector是需要更改样式的元素,property为css属性的名称,value应用的哪种 ...

  9. UVA 11732 strcmp() Anyone? (压缩版字典树)

    题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...

  10. iOS 用代码+Xib搭建UI界面实例

    1.背景 有些我们不能只用代码去构建界面,代码是万能的,你用其他方式可以实现的界面,用代码也一定能 实现,但是我们没必要这样做,有的时候用xib会是更好的选择,代码和xib的优劣地方我们得知道,为了 ...