Skip to content

Commit

Permalink
fix: minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ssokolic committed Oct 16, 2023
2 parents 43dcd2c + 4399465 commit 81493a7
Show file tree
Hide file tree
Showing 12 changed files with 484 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/megalinter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,19 @@ jobs:
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: MegaLinter
id: ml
uses: megalinter/megalinter/flavors/[email protected]
env:
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE: COPYPASTE,SPELL
DISABLE_LINTERS: TERRAFORM_TERRASCAN
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
report
mega-linter.log
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog for xoap-application-packaging-dsc

The format is based on and uses the types of changes according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- None

### Changed

- None

### Deprecated

- None

### Removed

- None

### Fixed

- None

### Security

- None
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing

tbd

## Running the Tests

tbd
124 changes: 124 additions & 0 deletions DSCResources/Services/Services.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
# Module manifest for module 'Services'
#
# Generated by: Sinisa Sokolic
#
# Generated on: 7/25/2023
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'Services.schema.psm1'

# Version number of this module.
ModuleVersion = '0.0.1'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '09a6295a-d863-47d9-b8ac-22fedaf9fcfc'

# Author of this module
Author = 'Sinisa Sokolic'

# Company or vendor of this module
CompanyName = 'RIS AG'

# Copyright statement for this module
Copyright = '(c) 2023 XOAP. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Configure Windows Services for Azure Virtual Desktop VMs based on Windows 11.'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.1'

# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the Windows PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# CLRVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
# Tags = @()

# A URL to the license for this module.
# LicenseUri = ''

# A URL to the main website for this project.
# ProjectUri = ''

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}


53 changes: 53 additions & 0 deletions DSCResources/Services/Services.schema.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<#
.SYNOPSIS​
Please fill me.
.DESCRIPTION​
Please fill me.
.COMPONENT​
Information about PowerShell Modules to be required. ​
Powershell Module: PSDesiredStateConfiguration​
Powershell Module: AuditPolicyDSC​
Powershell Module: SecurityPolicyDSC​
Powershell Module: PowerShellAccessControl​
​Powershell Module: WindowsDefender
.EXAMPLE
Get-DscResource -Module XOAP*
.NOTES
For more information about advanced functions, call Get-Help with any
of the topics in the links listed below.
Module Name : XOAPModuleTemplateDSC
Resource Name : Services.schema.psm1
Author : [email protected]
.LINK​
https://www.microsoft.com/en-us/download/details.aspx?id=55319​
.LINK​
https://www.powershellgallery.com/packages/BaselineManagement/2.9.0​
.LINK​
https://gallery.technet.microsoft.com/scriptcenter/PowerShellAccessControl-d3be7b83​
.LINK
https://www.powershellgallery.com/packages/WindowsDefender/1.0.0.4
#>
configuration Services
{

#Import-DSCResource -ModuleName xPSDesiredStateConfiguration
#
#xRegistry disableInsecureCipher_a
#{
# Key = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56'
# ValueName = 'Enabled'
# ValueData = '0'
# ValueType = 'Dword'
# Ensure = 'Present'
# Force = $true
#}

}
Empty file added Examples/Resources/_dummy
Empty file.
27 changes: 27 additions & 0 deletions Examples/XOAPModuleTemplateDSC.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
configuration XOAPModuleTemplateDSC
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)

Import-Module XOAPModuleTemplateDSC
Import-DSCResource -ModuleName XOAPModuleTemplateDSC

Node $NodeName
{

$moduleRoot = [io.path]::GetDirectoryName((Get-Module XOAPModuleTemplateDSC).Path)
#$examples = "$moduleRoot\Examples"

# Install the IIS role
WindowsFeature IIS
{
Ensure = "Present"
Name = "Web-Server"
}

}
}

48 changes: 48 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
# XOAPRemoteDesktopServicesDSC

This repository contains a PowerShell DSC module for the deployment of a complete Remote Desktop Services environment.
Expand All @@ -12,6 +13,7 @@ Please check out common DSC Community [contributing guidelines](https://dsccommu

## Change log

<<<<<<< HEAD
A full list of changes in each version can be found in the [Releases](https://github.com/xoap-io/XOAPRemoteDesktopServicesDSC/releases).

## Documentation
Expand Down Expand Up @@ -444,3 +446,49 @@ Download the registration script for the session host node:
> Be sure to run the script as administrator in PowerShell 5.1
After a few minutes, your nodes should show up as compliant in XOAP.
=======
A full list of changes in each version can be found in the [change log](CHANGELOG.md).

## Documentation

This script is used to easily create new DSC modules and resources.

## Prerequisites

Please install Plaster first and make sure it's present.

```powershell
Install-Module Plaster
Import-Module Plaster
```

## Create new DSC modules

Modules will be automatically created once you are creating a new DSC resource.

## Create new DSC resources

DSC resources can easily be deployed via the invocation of

```powershell
.\New-CompositeResource.ps1
```

with parameters

```powershell
.\New-CompositeResource.ps1 -Module XOAPModuleTemplateDSC -Version 0.0.1 -Resource ScheduledTasks
```

The parameter list is as followed:

| Parameter | Description | Note |
|-----------|----------------------------------------|------|
| Module | Name of the outer module part | - |
| Version | Target version of the module | - |
| Ressource | The name of the ressource /config part | - |

### Examples

You can review the [Examples](/Examples/Resources) directory in the **XOAPModuleTemplateDSC** module
for some general use scenarios for all the resources that are in the module.
Loading

0 comments on commit 81493a7

Please sign in to comment.