Author Posts

June 7, 2016 at 7:50 am

Hi
Background: I have written 8-10 custom PowerShell class 5 Dsc Resources up to now. Mostly checking configurations in sql and SharePoint and installation of SharePoint prerequisites (without the prerequisiteinstaller.exe :-))

I now want to create a Installation DSCresource that finds its binary-files on a network share. To do this I will need a "Credential" parameter that is used to access the network share. How would I go about defining this parameter in my DSCresource?

I'm thinking i can create a normal parameter of type PSCredential, then somehow make my DSCresource use this credential to access the share..
Any tips or pointers are welcome!

brgs

Bjørn

June 7, 2016 at 8:28 am

I noticed that i could probably use the :
New-PSDrive -Name P -PSProvider FileSystem -Root \\Server01\Public -Credential user\domain -Persist

It always helps shouting it out loud :f

brgs

bJørn