Giter Club home page Giter Club logo

Comments (5)

connochio avatar connochio commented on July 20, 2024

Yep, this can be done using a modified version of the module.

Please see the newly created SCCM folder under the root of this Git:

  1. Download the Get-DellWarranty.ps1 script
  2. Create a package within your SCCM instance with the folder that contains the script as a content source
  3. Create a program under that package, and within 'Command Line' enter this:
    %Windir%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -Command ".\Get-DellWarranty.ps1 -ApiKey xxxxx -ApiSecret xxxxx"
    Replacing xxxxx with your key and secret without any quotations or anything

You can then deploy it out to assets to run the script.
One benefit of this approach is it keeps the API key and Secret from being stored directly on the client device.

To have it picked up by SCCM within the hardware inventory, you will need to amend your Hardware Inventory classes within your default client settings.

Please let me know if this works for you.

from powershell.modules.

apollo753 avatar apollo753 commented on July 20, 2024

I just tried this and I can't get it to work. Do I also need a new psm1 file? Before putting this in SCCM I am trying to execute on my PC first.
DellWarranty

Putting the api key as before it works fine see below
DellWarrantygood

Thank you for you help on this!

from powershell.modules.

connochio avatar connochio commented on July 20, 2024

I think I can see the issue here.

The SCCM script is a stripped down version of the module and does not have any switches apart from the -ApiKey and -ApiSecret and shows no output upon completion due to being run in the background by SCCM.
By using these switches, it doesn't store the API information on the local machine by design, to avoid any issues with security of the key.

It looks to be that the .ps1 ran successfully in your first screenshot before it was ran with the -show tag, which left the authentication call to use a blank API and Secret.

Please remove any entries from HKLM:\Software\WARRANTY and re-run the first command using just the -ApiKey and -ApiSecret switches as a test.

If the registry is populated after this, then the script has run successfully.

from powershell.modules.

apollo753 avatar apollo753 commented on July 20, 2024

Okay it works in the SCCM image during the OSD. I assumed it did not work because the system was asking for the key. But I just looked on a deployed system that I was testing and the registry is branded. I only need this done once so it is perfect, when the api changes I will just update the SCCM task sequence.
Thank you so much for your help!

from powershell.modules.

connochio avatar connochio commented on July 20, 2024

No worries!
Glad I was able to help!

I will try to keep this up to date if Dell changes their API, as that happened with a previous version of this module.
I have also created a new Git repo for the SCCM deployable version of this script at https://github.com/connochio/Powershell.SCCM for any future development or issues :)

from powershell.modules.

Related Issues (2)

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.