mkht / dscr_shortcut Goto Github PK
View Code? Open in Web Editor NEWPowerShell DSC Resource to create shortcut file.
License: MIT License
PowerShell DSC Resource to create shortcut file.
License: MIT License
Hi, is it possible to pre-compile the ShellLink.cs and VKeyUtil.cs into a .dll? Currently, this module takes about 800 ms to load on my machine, which is quite slow.
It should be enough to just target netstandard2.0 and import the .dll instead of using Add-Type
. Everything should work exactly as now, just with faster startup.
I can do a PR if you're ok with that.
発生条件は要調査
cShortcut GoogleChrome_DesktopShortcut_CreateToTargetUser
{
Ensure = 'Present'
Path = Join-Path ('C:\Users\{0}' -f $TargetUser) '\Desktop\Google Chrome.lnk'
Target = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
}
IconLocationの既定値が空文字ではなく,0
のため
Method not found: 'System.Collections.Generic.List1 Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.ImportClasses(System.String, System.Tuple
2, System.Collections.ObjectModel.Collection`1)'.
Invoke-DscResource
を使ってGetを直接実行するとエラーが発生
Invoke-DscResource -ModuleName DSCR_Shortcut -Name cShortcut -Method Get -Property $para
プロパティの 'HotKey' 値を型 'STRING' から型 'STRING[]' に変換できませんでした
行:15、文字:2
バッファー:
irectResourceAccess";
};^
insta
+ CategoryInfo : SyntaxError: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MiClientApiError_Failed
+ PSComputerName : localhost
WshShortcut.IconLocation
Hi,
Thank you for putting this together. Seeing something a little strange. I have a simple shortcut need that keeps failing the test process of DSC.
The DSC works, it creates the proper shortcut and the shortcut works, but it always fails the test with the following error "Target property is not matched"
I'm only specifying the following:
cShortcut "cShortcut_$($ConfigurationBaseName)_shortcut"
{
Path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Log Parser Studio.lnk"
Target = "C:\Blah\IT\Infrastructure Services\SysAdmins\DSC\Download Cache\Microsoft\LogParser Studio\2.0.0.100\LPS.exe"
}
Any idea what i might be doing wrong? Like I said,the shortcut does work and it does exist, it just fails the test process.
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.