GithubHelp home page GithubHelp logo

Comments (7)

mbreakey3 avatar mbreakey3 commented on August 18, 2024

Hi Dave,

Unfortunately, the best solution I have for you is to add "-WarningAction SilentlyContinue" to the call to your config. However, that will suppress all warnings which I assume is what you're trying to avoid. You could potentially write your own warning/error handling function similar to what's described in this thread but that may be more work than what you want to put in.

To answer your questions:

  1. We currently don't have a timeline for migrating the File resource. We would like to do this in the future, but currently we don't have the bandwidth.
  2. This looks like a bug on our side, you should just be able to import the File resource, but it seems that there's some issue there. I'll look into this and get back to you if I have any updates. Unfortunately, we most likely will not be able to get a fix for this any time soon (if it is a bug on our side) since this is a resource that is shipped in-box and for the most part we're only releasing critical or security related updates to those resources.
  3. I don't know a better way other than what I mentioned above. Warnings are a bit more tricky to deal with than errors.

from psdscresources.

dave-sampson13 avatar dave-sampson13 commented on August 18, 2024

Thanks @mbreakey3, that's kind of where I'd got to as well. Being able to use (2) would have been ideal, but in the absence of that I've resorted to capturing warnings from the DSC MOF build in a variable using -WarningVariable buildWarnings -WarningAction SilentlyContinue, then inspecting these using a set of RegExs for "known safe" warnings that I'm happy to suppress or else I write out the warning. It's clunky but works.

from psdscresources.

mbreakey3 avatar mbreakey3 commented on August 18, 2024

Ah, that's even a bit cleaner than what I was thinking, but certainly still clunky. Yeah, sorry I don't have a better solution for you at this time.

from psdscresources.

johlju avatar johlju commented on August 18, 2024

@turkeys-united Closing this issue as not fixed even if you got answers on your questions that main question, a File resource in this repo. Propose that you submit a new issue with resource proposal in this repository so that the community maybe could port the resource.

from psdscresources.

johlju avatar johlju commented on August 18, 2024

With port I meant to crate a File resource in this repository similar to the builtin File resource. 🙂

from psdscresources.

kevinpohlmeier avatar kevinpohlmeier commented on August 18, 2024

When you run Get-DscResource -Module PSDesiredStateConfiguration, you can see that the ModuleName of the File resource is blank. I guess that's why question #2 is an issue.

from psdscresources.

PlagueHO avatar PlagueHO commented on August 18, 2024

Hi @kevinpohlmeier - the File resource is a special resource. It is actually implemented as a native WMI object. It is built-in to the OS. So we can't actually implement a version in this module - unless we rewrite it from scratch. So, that is why you won't find the File resource in this module or xPSDesiredStateConfiguration.

from psdscresources.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.