首页 \ 问答 \ DSC推送模式 - 复制DSC资源的最佳方式(DSC Push mode - best way to copy DSC resources)

DSC推送模式 - 复制DSC资源的最佳方式(DSC Push mode - best way to copy DSC resources)

我正在探索DSC并想知道将DSC资源复制到目标主机的最佳方法是什么?

当我尝试将配置推送到目标主机时,它抱怨缺少DSC资源。

The PowerShell DSC resource xWebAdministration does not exist at the PowerShell module path nor is it registered as a WMI DSC resource.
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : DscResourceNotFound
    + PSComputerName        : server1.appman.net

I'm exploring DSC and wondering what's the best way to copy DSC resources to target host ?

When I try to push my configuration to the target host, It complain of missing DSC resource.

The PowerShell DSC resource xWebAdministration does not exist at the PowerShell module path nor is it registered as a WMI DSC resource.
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : DscResourceNotFound
    + PSComputerName        : server1.appman.net

原文:https://stackoverflow.com/questions/36848209
更新时间:2019-12-09 10:31

最满意答案

内存堆绝对不是堆数据结构。 也就是说,它不是优先级队列。 我想你可以使用优先级队列堆来构建内存堆,但有更好的方法可以做到这一点。

堆栈是......好......通常,堆栈是分配给进程的固定内存块。 处理器本身将该内存块视为纯栈。 也就是说,处理器的堆栈指针指向堆栈的顶部,推送和弹出指令按预期工作,向堆栈添加内容和从堆栈中删除内容。 就这样,它是LIFO。

然而,处理器可以用堆栈做各种事情:推送和弹出不同大小的东西,直接进入它(即查看第三个项目而不弹出前两个),等等。所以尽管处理器堆栈确实有​​推送和弹出说明,它还具有更多的扩展功能。 我不会称之为纯粹的LIFO数据结构。


The memory heap is decidedly not a heap data structure. That is, it's not a priority queue. I suppose you could use a priority queue heap to build a memory heap, but there are much better ways to do it.

The stack is ... well ... Typically, the stack is a fixed block of memory allocated to the process. The processor itself treats that block of memory like a pure stack. That is, the processor's stack pointer points to the top of stack, and the push and pop instructions work as expected, adding things to and removing things from the stack. In that way, it's LIFO.

However, the processor can do all manner of things with the stack: push and pop different sized things, address directly into it (i.e. view the third item without popping the first two), etc. So although the processor stack does have push and pop instructions, it also has much more extended functionality. I wouldn't call it a pure LIFO data structure.

相关问答

更多
  • 不,堆栈和堆之间的区别不是性能。 它的使用寿命:函数内的任何局部变量(任何不是malloc()或new)都存在于堆栈中。 当您从功能返回时,它会消失。 如果你想要的东西比声明它的功能更长,你必须在堆上分配它。 class Thingy; Thingy* foo( ) { int a; // this int lives on the stack Thingy B; // this thingy lives on the stack and will be deleted when we retu ...
  • Python中如何管理变量和内存。 自动的! 不,真的,您只需创建一个对象,Python虚拟机将处理所需的内存以及将其放置在内存布局中的位置。 它有堆栈和堆,并使用什么算法来管理内存? 当我们谈论CPython它使用专用堆来存储对象。 从官方的Python文档 : Python中的内存管理涉及包含所有Python对象和数据结构的私有堆。 这个专用堆的管理由Python内存管理器内部保证。 Python内存管理器具有不同的组件,可处理各种动态存储管理方面,如共享,分段,预分配或缓存。 用于垃圾收集的算法称为引 ...
  • m分配在堆上,其中包括myInt 。 在堆栈中分配原始类型(和结构体)的情况是在方法调用期间,它为堆栈中的局部变量分配空间(因为它更快)。 例如: class MyClass { int myInt = 0; string myString = "Something"; void Foo(int x, int y) { int rv = x + y + myInt; myInt = 2^rv; } } rv , x , y都将在堆栈上。 my ...
  • 由于我对答案不满意,希望同一位karjatkar想学习更多,而不仅仅是一个简单的是/否答案,在这里你去。 通常,一个进程有5个不同的内存分配区域 代码 - 文本段 初始化数据 - 数据段 未初始化的数据 - bss段 堆 堆 如果您真的想了解保存的内容,然后阅读并加上书签: 编译器,汇编器,链接器和装载器:简要说明 (见表5) 记忆中的程序解剖学 alt text http://www.tenouk.com/ModuleW_files/ccompilerlinker006.png Since I wasn' ...
  • 内存堆绝对不是堆数据结构。 也就是说,它不是优先级队列。 我想你可以使用优先级队列堆来构建内存堆,但有更好的方法可以做到这一点。 堆栈是......好......通常,堆栈是分配给进程的固定内存块。 处理器本身将该内存块视为纯栈。 也就是说,处理器的堆栈指针指向堆栈的顶部,推送和弹出指令按预期工作,向堆栈添加内容和从堆栈中删除内容。 就这样,它是LIFO。 然而,处理器可以用堆栈做各种事情:推送和弹出不同大小的东西,直接进入它(即查看第三个项目而不弹出前两个),等等。所以尽管处理器堆栈确实有推送和弹出说明, ...
  • 虚拟内存操作系统(使用带MMU的CPU时)会在需要时自动增大数据/堆栈段,最多可达到最大值。 在POSIX系统上,可以使用setrlimit()配置最大值,如W. Craig Trader所说。 POSIX为限制定义了RLIMIT_DATA,RLIMIT_STACK和RLIMIT_AS。 malloc()在内部使用brk()来扩展/收缩数据段,或使用mmap()/ munmap()来请求/释放内存映射。 当CPU尝试访问分配的堆栈下方的内存时,堆栈会增长。 在没有MMU的系统(例如uClinux)上,可执行 ...
  • CString csToken变量被分配在堆栈上,但是一旦某个字符串被分配给它,它就会在堆上分配它的内部缓冲区。 您不需要释放由csToken explicity占用的任何内存,一旦csToken变量超出范围并且调用其析构函数,它就会被释放。 Your csToken variable is an instance of CString allocated on the stack, so you don't need to do anything to delete it: its destructor ...
  • 你的Point实际上驻留在堆栈上 - 没有Box或其他结构可以放在堆上。 是的,可能(虽然明显不安全)将地址传递给*ptr (这是一个空指针)并将其转换为&ptr - 这是不安全的,因为后者保证为非空。 因此,只要底层系统允许你这样做(当前大多数系统可能只是通过分段错误来终止你的进程),它当然可能 (尽管非常不安全)访问非堆内存。 Your Point actually resides on the stack – there is no Box or other structure to put it o ...
  • 堆栈和堆与Fortran没有任何直接关系,标准对它们一无所知。 同样C,至少到C89,之后我的知识就不那么好了。 相反,编译器必须将标准定义的语言特征转换为底层内存模型。 该内存模型是编译器实现者的选择,但通常最方便的是使用目标操作系统为您提供的任何功能。 因此,您经常会看到堆栈和堆,但至少就Fortran和C而言,与编程语言无关。 Stack and heap have nothing directly to do with Fortran, the standard says nothing about ...
  • 需要记住的一件重要事情是, javac编译器在优化方面没有做太多工作,也没有为您提供任何指定数据存储位置或代码优化方式的方法。 (在Java 8中有一些不起眼的例外,比如@Contended) Java从通常在运行时运行的库中获取大部分可扩展性。 (通常还有构建时选项)要实现的一个关键事项是Java程序可以在运行时生成和更改代码,因此实际上很多智能都是在运行时发生的。 在堆外使用的情况下,你需要一个支持这个功能的库,这将直接或间接使用sun.misc.Unsafe (在大多数流行的JVM上)这个类允许你做很 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)