Closed putrtek closed 4 years ago
Hello Putrek,
PowerSTIG uses composite resources, so the schema.mof isn't required, you can read up on that here. https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/authoringresourcecomposite?view=powershell-7
With that said, if you are trying to test PowerSTIG's milestone (zip) vs release("install-module PowerSTIG"), the process to install is a bit different.
Here is the way you can test the milestone
.\build.ps1 -Tasks build
At this point you should be able to run your command and see the following
PS C:\Users\eric\Desktop> Get-DscResource -Module PowerSTIG
ImplementedAs Name ModuleName Version Properties
------------- ---- ---------- ------- ----------
Composite Adobe PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, AdobeApp, Sti...
Composite DotNetFramework PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, FrameworkVers...
Composite FireFox PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, InstallDirect...
Composite IisServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, L...
Composite IisSite PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, W...
Composite InternetExplorer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, BrowserVersio...
Composite McAfee PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, TechnologyRol...
Composite Office PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OfficeApp, St...
Composite OracleJRE PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, ConfigPath, P...
Composite SqlServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, SqlVersion, S...
Composite Vsphere PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, Version, Host...
Composite WindowsClient PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St...
Composite WindowsDefender PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ...
Composite WindowsDnsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St...
Composite WindowsFirewall PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ...
Composite WindowsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, Os...
Let me know how this works out for you!
Thanks,
Eric
Mark Buckley putrtek@gmail.com 757-818-9902
On Wed, Jun 3, 2020 at 5:56 PM Eric Jenkins notifications@github.com wrote:
Hello Putrek,
PowerSTIG uses composite resources, so the schema.mof isn't required, you can read up on that here. https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/authoringresourcecomposite?view=powershell-7 http://url
With that said, if you are trying to test PowerSTIG's milestone (zip) vs release("install-module PowerSTIG"), the process to install is a bit different.
Here is the way you can test the milestone
- Download the Zip (ensure you have selected branch 4.4.0 from the drop-down)
- Unzip the archive to the test environment
- Open Powershell as admin and navigate to the extracted directory and run .\build.ps1 -Tasks build
- After the build completes you will notice another directory "Output" has been created.
- Update the folder name from 0.0.1 > 4.4.0
- Update the ModuleVersion = '0.0.1' > 4.40 in the PowerSTIG.psd1
- Copy the PowerSTIG folder to your PowerShell Modules directory (C:\Program Files\WindowsPowerShell\Modules)
At this point you should be able to run your command and see the following
PS C:\Users\eric\Desktop> Get-DscResource -Module PowerSTIG
ImplementedAs Name ModuleName Version Properties ------------- ---- ---------- ------- ---------- Composite Adobe PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, AdobeApp, Sti... Composite DotNetFramework PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, FrameworkVers... Composite FireFox PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, InstallDirect... Composite IisServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, L... Composite IisSite PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, W... Composite InternetExplorer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, BrowserVersio... Composite McAfee PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, TechnologyRol... Composite Office PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OfficeApp, St... Composite OracleJRE PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, ConfigPath, P... Composite SqlServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, SqlVersion, S... Composite Vsphere PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, Version, Host... Composite WindowsClient PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsDefender PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsDnsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsFirewall PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, Os...
Let me know how this works out for you!
Thanks,
Eric
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-638482264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7IEBGCM6V6JHV7UWMTRU3BHDANCNFSM4NR67RHA .
@putrtek,
Here is the dropdown.
Thanks,
Eric
Mark Buckley putrtek@gmail.com 757-818-9902
On Thu, Jun 4, 2020 at 12:08 PM Eric Jenkins notifications@github.com wrote:
@putrtek https://github.com/putrtek,
Here is the dropdown. [image: image] https://user-images.githubusercontent.com/44269812/83781042-fae88a80-a65b-11ea-915e-dc1909ea9739.png
Thanks,
Eric
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-638953899, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7PSAYKQJF2EYPEWGJTRU7BHDANCNFSM4NR67RHA .
when I run .\build.ps1 -Tasks build it installs a bunch of dependencies then gives me this error
C:\Users\putrt\Downloads\powershell\PowerSTIG\PowerStig-4.4.0\PowerStig-4.4.0\output\RequiredModules\InvokeBuild\5.6.0\Invoke-Build.ps1 : The term 'Set-BuildHeader' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\putrt\Downloads\powershell\PowerSTIG\PowerStig-4.4.0\PowerStig-4.4.0\build.ps1:418 char:9
+ CategoryInfo : InvalidArgument: (:) [Invoke-Build.ps1],
Exception
+ FullyQualifiedErrorId : Invoke-Build.ps1
-- Mark Buckley putrtek@gmail.com 757-818-9902
On Wed, Jun 3, 2020 at 5:56 PM Eric Jenkins notifications@github.com wrote:
Hello Putrek,
PowerSTIG uses composite resources, so the schema.mof isn't required, you can read up on that here. https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/authoringresourcecomposite?view=powershell-7 http://url
With that said, if you are trying to test PowerSTIG's milestone (zip) vs release("install-module PowerSTIG"), the process to install is a bit different.
Here is the way you can test the milestone
- Download the Zip (ensure you have selected branch 4.4.0 from the drop-down)
- Unzip the archive to the test environment
- Open Powershell as admin and navigate to the extracted directory and run .\build.ps1 -Tasks build
- After the build completes you will notice another directory "Output" has been created.
- Update the folder name from 0.0.1 > 4.4.0
- Update the ModuleVersion = '0.0.1' > 4.40 in the PowerSTIG.psd1
- Copy the PowerSTIG folder to your PowerShell Modules directory (C:\Program Files\WindowsPowerShell\Modules)
At this point you should be able to run your command and see the following
PS C:\Users\eric\Desktop> Get-DscResource -Module PowerSTIG
ImplementedAs Name ModuleName Version Properties ------------- ---- ---------- ------- ---------- Composite Adobe PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, AdobeApp, Sti... Composite DotNetFramework PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, FrameworkVers... Composite FireFox PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, InstallDirect... Composite IisServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, L... Composite IisSite PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, W... Composite InternetExplorer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, BrowserVersio... Composite McAfee PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, TechnologyRol... Composite Office PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OfficeApp, St... Composite OracleJRE PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, ConfigPath, P... Composite SqlServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, SqlVersion, S... Composite Vsphere PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, Version, Host... Composite WindowsClient PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsDefender PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsDnsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsFirewall PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, Os...
Let me know how this works out for you!
Thanks,
Eric
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-638482264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7IEBGCM6V6JHV7UWMTRU3BHDANCNFSM4NR67RHA .
That function is part of the module invokebuild, which appears to be listed in the required modules. Are you running this as Admin? Also, what OS are you using?
Thanks, Eric
Mark Buckley putrtek@gmail.com 757-818-9902
On Fri, Jun 5, 2020 at 2:28 PM Eric Jenkins notifications@github.com wrote:
That function is part of the module invokebuild, which appears to be listed in the required modules. Are you running this as Admin? Also, what OS are you using?
Thanks, Eric
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-639690451, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7M5EROCCZTDOKHL4JLRVE2OBANCNFSM4NR67RHA .
I'm seeing the same on a OOB Server 2019 build. I will investigate and let you know what I figure out.
Thanks,
Eric
Exact same error when I run as Admin... I'm on Windows 10 1909
-- Mark Buckley putrtek@gmail.com 757-818-9902
On Fri, Jun 5, 2020 at 2:37 PM Mark Buckley putrtek@gmail.com wrote:
I did not run as admin... I'll try it again Thanks
Mark Buckley putrtek@gmail.com 757-818-9902
On Fri, Jun 5, 2020 at 2:28 PM Eric Jenkins notifications@github.com wrote:
That function is part of the module invokebuild, which appears to be listed in the required modules. Are you running this as Admin? Also, what OS are you using?
Thanks, Eric
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-639690451, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7M5EROCCZTDOKHL4JLRVE2OBANCNFSM4NR67RHA .
I'm glad it's not just me being stupid :)
-- Mark Buckley putrtek@gmail.com 757-818-9902
On Fri, Jun 5, 2020 at 2:42 PM Eric Jenkins notifications@github.com wrote:
I'm seeing the same on a OOB Server 2019 build. I will investigate and let you know what I figure out.
Thanks,
Eric
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-639699183, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7MTACDVPGI7RFEI6NLRVE4DFANCNFSM4NR67RHA .
Thanks to @bcwilhite for the quick assist.
After you download the zip, make sure you right click and "unblock", then process should run smoothly.
Thanks,
Eric
Mark Buckley putrtek@gmail.com 757-818-9902
On Fri, Jun 5, 2020 at 4:23 PM Eric Jenkins notifications@github.com wrote:
Thanks to @bcwilhite https://github.com/bcwilhite for the quick assist.
After you download the zip, make sure you right click and "unblock", then process should run smoothly.
Thanks,
Eric
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-639782575, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7KPWEO3MRTGSVUF7VDRVFH5JANCNFSM4NR67RHA .
SO after I unblocked the ZIP the build completed successfully this time with no errors.
When I run Get-DscResource -Module PowerSTIG I get the error below... actually the error repeats itself 16 times ... then I get the output I was expecting like you showed above..
ImportCimAndScriptKeywordsFromModule : The class name 'MSFT_AccountPolicy' does not match 'IisServer', the name of the file in which it is defined. Rename either the file name to match the class name or vice versa At
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:4143 char:29
+ CategoryInfo : NotSpecified: (:)
[Write-Error], PSInvalidOperationException
+ FullyQualifiedErrorId :
System.Management.Automation.PSInvalidOperationException,ImportCimAndScriptKeywordsFromM
odule
-- Mark Buckley putrtek@gmail.com 757-818-9902
On Wed, Jun 3, 2020 at 5:56 PM Eric Jenkins notifications@github.com wrote:
Hello Putrek,
PowerSTIG uses composite resources, so the schema.mof isn't required, you can read up on that here. https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/authoringresourcecomposite?view=powershell-7 http://url
With that said, if you are trying to test PowerSTIG's milestone (zip) vs release("install-module PowerSTIG"), the process to install is a bit different.
Here is the way you can test the milestone
- Download the Zip (ensure you have selected branch 4.4.0 from the drop-down)
- Unzip the archive to the test environment
- Open Powershell as admin and navigate to the extracted directory and run .\build.ps1 -Tasks build
- After the build completes you will notice another directory "Output" has been created.
- Update the folder name from 0.0.1 > 4.4.0
- Update the ModuleVersion = '0.0.1' > 4.40 in the PowerSTIG.psd1
- Copy the PowerSTIG folder to your PowerShell Modules directory (C:\Program Files\WindowsPowerShell\Modules)
At this point you should be able to run your command and see the following
PS C:\Users\eric\Desktop> Get-DscResource -Module PowerSTIG
ImplementedAs Name ModuleName Version Properties ------------- ---- ---------- ------- ---------- Composite Adobe PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, AdobeApp, Sti... Composite DotNetFramework PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, FrameworkVers... Composite FireFox PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, InstallDirect... Composite IisServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, L... Composite IisSite PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, W... Composite InternetExplorer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, BrowserVersio... Composite McAfee PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, TechnologyRol... Composite Office PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OfficeApp, St... Composite OracleJRE PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, ConfigPath, P... Composite SqlServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, SqlVersion, S... Composite Vsphere PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, Version, Host... Composite WindowsClient PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsDefender PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsDnsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsFirewall PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, Os...
Let me know how this works out for you!
Thanks,
Eric
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-638482264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7IEBGCM6V6JHV7UWMTRU3BHDANCNFSM4NR67RHA .
Mark Buckley putrtek@gmail.com 757-818-9902
On Fri, Jun 5, 2020 at 1:21 PM Mark Buckley putrtek@gmail.com wrote:
when I run .\build.ps1 -Tasks build it installs a bunch of dependencies then gives me this error
C:\Users\putrt\Downloads\powershell\PowerSTIG\PowerStig-4.4.0\PowerStig-4.4.0\output\RequiredModules\InvokeBuild\5.6.0\Invoke-Build.ps1 : The term 'Set-BuildHeader' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\putrt\Downloads\powershell\PowerSTIG\PowerStig-4.4.0\PowerStig-4.4.0\build.ps1:418 char:9
- Invoke-Build @PSBoundParameters -Task $Tasks -File $MyInvocat ...
+ CategoryInfo : InvalidArgument: (:) [Invoke-Build.ps1], Exception + FullyQualifiedErrorId : Invoke-Build.ps1
-- Mark Buckley putrtek@gmail.com 757-818-9902
On Wed, Jun 3, 2020 at 5:56 PM Eric Jenkins notifications@github.com wrote:
Hello Putrek,
PowerSTIG uses composite resources, so the schema.mof isn't required, you can read up on that here. https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/authoringresourcecomposite?view=powershell-7 http://url
With that said, if you are trying to test PowerSTIG's milestone (zip) vs release("install-module PowerSTIG"), the process to install is a bit different.
Here is the way you can test the milestone
- Download the Zip (ensure you have selected branch 4.4.0 from the drop-down)
- Unzip the archive to the test environment
- Open Powershell as admin and navigate to the extracted directory and run .\build.ps1 -Tasks build
- After the build completes you will notice another directory "Output" has been created.
- Update the folder name from 0.0.1 > 4.4.0
- Update the ModuleVersion = '0.0.1' > 4.40 in the PowerSTIG.psd1
- Copy the PowerSTIG folder to your PowerShell Modules directory (C:\Program Files\WindowsPowerShell\Modules)
At this point you should be able to run your command and see the following
PS C:\Users\eric\Desktop> Get-DscResource -Module PowerSTIG
ImplementedAs Name ModuleName Version Properties ------------- ---- ---------- ------- ---------- Composite Adobe PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, AdobeApp, Sti... Composite DotNetFramework PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, FrameworkVers... Composite FireFox PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, InstallDirect... Composite IisServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, L... Composite IisSite PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, IisVersion, W... Composite InternetExplorer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, BrowserVersio... Composite McAfee PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, TechnologyRol... Composite Office PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OfficeApp, St... Composite OracleJRE PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, ConfigPath, P... Composite SqlServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, SqlVersion, S... Composite Vsphere PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, Version, Host... Composite WindowsClient PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsDefender PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsDnsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, St... Composite WindowsFirewall PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, StigVersion, ... Composite WindowsServer PowerStig 4.4.0 {DependsOn, PsDscRunAsCredential, OsVersion, Os...
Let me know how this works out for you!
Thanks,
Eric
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-638482264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7IEBGCM6V6JHV7UWMTRU3BHDANCNFSM4NR67RHA .
Hi @putrtek I wanted to reach out to ensure we can close this issue.
Yes u can close
On Mon, Jun 8, 2020 at 5:23 PM Brian Wilhite notifications@github.com wrote:
Hi @putrtek https://github.com/putrtek I wanted to reach out to ensure we can close this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerStig/issues/646#issuecomment-640894718, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFJS7NGCIORSLCOHHMW7NLRVVJEVANCNFSM4NR67RHA .
--
Mark Buckley putrtek@gmail.com 757-818-9902
Describe the bug
I've installed the POWERSTIG module. After install Running get-dscresource does not show PowerSTIG or any of it's DSC resources Looking at the dscresources folder I noticed that none of the resources have schema.mof files Isn't that a required file for Dsc resouces to work correctly? An I missing something?
I downloaded the latest ZIP file today and there are no schema.mof files in it either