PowerShell scripts for Mick's IT Blogs
micksitblogs / powershell Goto Github PK
View Code? Open in Web Editor NEWPowerShell scripts for Mick's IT Blogs
License: MIT License
PowerShell scripts for Mick's IT Blogs
License: MIT License
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.
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] }
Hi Mick,
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.
https://github.com/MicksITBlogs/PowerShell/blob/master/InstallFonts.ps1#L51 and https://github.com/MicksITBlogs/PowerShell/blob/master/InstallFonts.ps1#L53 relies on hard coded drive C, but Windows can be installed to any drive. You should use windir
environment variable instead.
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*"
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
On line 196, you are searching for ID = 6006, should that not be 51? 6006 would give a lot more errors!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.