Code Monkey home page Code Monkey logo

powershell's Issues

Edit script for deployment

Can you please help me how can I supply ProductKey within the scripts itself.

I'm creating a SCCM baseline and facing issue while using the script. Please help.

Uninstall-InnoSetup.ps1 with wildcard ?

my application name contain the application version, like "myapp v1.5", how to add the possibility to uninstall innot setup application by wild card ?

Like :

PS > Uninstall-InnoSetup "myapp v*"

Method invocation failed: System.Object does not contain 'Trim'

I'm getting an error on one of the trims:

Method invocation failed because [System.Object[]] does not contain a method named 'Trim'.
At line:190 char:5

190: $Output = (((((cmd.exe /c $Arguments | Where-Object { $_ -like "Enabled" } | Where-Object { $_ -notlike "example" }) -replace 'Enabled', '').Trim()) -replace '^\d+', '').Trim()) | ForEach-Object { ($_ -split ' {2,}')[1] }

Script Editing and Deploymgnt

Hi Mick,

  1. Is it mandatory to put exclusion path to script. I don't have anything to exclude it for now but later on it could be. Can I mark those lines as comment ?
  2. Can I deploy script as baseline in sccm instead creating package ?

Note: I have deployed the script as Baseline in sccm but not getting compliance from Client. I have not mentioned correct path in exclusion variable in script.

Found some error when run this powershell

NIC: Intel(R) Ethernet Connection (7) I219-V
Allow the computer to turn off this device.....Success
Allow this device to wake the computer.....Success
Only allow a magic packet to wake the computer.....Success
NIC: TAP-Windows Adapter V9

Allow the computer to turn off this device.....The property 'Enable' cannot be found on this object. Verify that the property exists and can be set.
At line:160 char:4
+             $NICPowerManage.Enable = $TurnOffDevice
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound
 
Method invocation failed because [System.Management.Automation.PSInternalMemberSet] does not contain a method named 'Put'.
At line:161 char:4
+             $HideOutput = $NICPowerManage.psbase.Put()
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Put:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

Failed

Allow this device to wake the computer.....The property 'Enable' cannot be found on this object. Verify that the property exists and can be set.
At line:173 char:4
+             $NICPowerManage.Enable = $WakeComputer
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound
 
Method invocation failed because [System.Management.Automation.PSInternalMemberSet] does not contain a method named 'Put'.
At line:174 char:4
+             $HideOutput = $NICPowerManage.psbase.Put()
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Put:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

Failed

Only allow a magic packet to wake the computer.....The property 'EnableWakeOnMagicPacketOnly' cannot be found on this object. Verify that the property exists and can be set.
At line:186 char:4
+             $NICPowerManage.EnableWakeOnMagicPacketOnly = $AllowMagic ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound
 
Method invocation failed because [System.Management.Automation.PSInternalMemberSet] does not contain a method named 'Put'.
At line:187 char:4

+             $HideOutput = $NICPowerManage.psbase.Put()

+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (Put:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound

Failed

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.