propecia kaufen

 31 Jul 2015 @ 5:54 AM 

Part of an inventory I did for a customer were some defaults of their IIS configuration.
Here’s a oneliner to get the default log directory from IIS:

(Get-WebConfigurationProperty '/system.applicationHost/sites/siteDefaults' -Name 'logfile.directory').Value
Posted By: Jeff Wouters
Last Edit: 31 Jul 2015 @ 05:54 AM

EmailPermalinkComments (0)
Tags
Categories: DuPSUG, PowerShell

 20 Jul 2015 @ 7:09 AM 

Last week I was helping a fellow IT Pro at a customer troubleshooting an Windows Azure Pack DSC resource.
We were getting errors we could not explain, but when running the code manually from our ISE everything went alright.
Eventually we pinned it down to a section of the code where we needed to get a True back, when instead we got a False.
There was one thing in our troubleshooting that triggered me…

When executing it through DSC, it failed.
When executing it by hand, it succeeded.

If you execute it via DSC, it runs in a system context.
Sure, you can define credentials, but there is no option for user interaction the moment the code hits the client.
So my guess was that there seemed to be something in the Azure DSC resource that required user interaction… and we started looking.
We didn’t find anything that required user interaction.
But there was something else. We used the DSC resources before… when installing all of the WAP roles on a single server.
And we had no issues with that. None at all!

So… what does not require user input, but works under a user context and doesn’t under a system context? …and has in any way a correlation between having all roles installed on a single server or spreading them out over multiple servers?
PowerShell Remoting!

As we found out, the Invoke-Command cmdlet was used all over the Azure DSC resources!
… and not to connect to remote devices, simply to execute code on the local machine.
After changing the code of the DSC resource and removing all the Invoke-Command entries in there, it worked like a charm! :-)

Invoke-Command in a DSC Resource
First: Invoke-Command basically is build on top of PowerShell Remoting. If you don’t need it, don’t use it. There are other ways of executing code locally 😉
In my personal opinion, there is no reason to use Invoke-Command in a DSC resource.

Second: If you need to execute code on a different machine than the one running the DSC configuration, use a different DSC configuration for that other machine!
You can use WaitFor* DSC resources for inter-node dependency and such :-)

Didn’t the author test this?
I guess he/she did. We only discovered this issue when we wanted to install Windows Azure Pack roles on separate servers instead of installing all of them on one server.
So when the author tested the resource, all roles were probably installed on a single server and no issue would appear 😉

*** UPDATE ***

Here’s a list of the Invoke-Command entries I’ve found over all x* DSC resources my customer is using:

Line Path
—- —-
36 \xAzurePack\DSCResources\MSFT_xAzurePackAdmin\MSFT_xAzurePackAdmin.psm1
95 \xAzurePack\DSCResources\MSFT_xAzurePackAdmin\MSFT_xAzurePackAdmin.psm1
41 \xAzurePack\DSCResources\MSFT_xAzurePackDatabaseSetting\MSFT_xAzurePackDatabaseSetting.psm1
99 \xAzurePack\DSCResources\MSFT_xAzurePackDatabaseSetting\MSFT_xAzurePackDatabaseSetting.psm1
40 \xAzurePack\DSCResources\MSFT_xAzurePackFQDN\MSFT_xAzurePackFQDN.psm1
119 \xAzurePack\DSCResources\MSFT_xAzurePackFQDN\MSFT_xAzurePackFQDN.psm1
40 \xAzurePack\DSCResources\MSFT_xAzurePackIdentityProvider\MSFT_xAzurePackIdentityProvider.psm1
124 \xAzurePack\DSCResources\MSFT_xAzurePackIdentityProvider\MSFT_xAzurePackIdentityProvider.psm1
40 \xAzurePack\DSCResources\MSFT_xAzurePackRelyingParty\MSFT_xAzurePackRelyingParty.psm1
124 \xAzurePack\DSCResources\MSFT_xAzurePackRelyingParty\MSFT_xAzurePackRelyingParty.psm1
111 \xAzurePack\DSCResources\MSFT_xAzurePackResourceProvider\MSFT_xAzurePackResourceProvider.psm1
265 \xAzurePack\DSCResources\MSFT_xAzurePackResourceProvider\MSFT_xAzurePackResourceProvider.psm1
145 \xAzurePack\DSCResources\MSFT_xAzurePackSetup\MSFT_xAzurePackSetup.psm1
261 \xAzurePack\DSCResources\MSFT_xAzurePackSetup\MSFT_xAzurePackSetup.psm1
239 \xDscDiagnostics\2.0\xDscDiagnostics.psm1
243 \xDscDiagnostics\2.0\xDscDiagnostics.psm1
38 \xJea\0.2.16.6\Examples\Demo1.ps1
39 \xJea\0.2.16.6\Examples\Demo1.ps1
37 \xJea\0.2.16.6\Examples\Demo2.ps1
64 \xJea\0.2.16.6\Examples\Demo3.ps1
65 \xJea\0.2.16.6\Examples\Demo3.ps1
88 \xPendingReboot\0.1.0.2\DSCResources\MSFT_xPendingReboot\MSFT_xPendingReboot.psm1
42 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
67 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
73 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
84 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
91 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
99 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
137 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
160 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
179 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
186 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
230 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
236 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
251 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
260 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
298 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
311 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
321 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
407 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
419 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
438 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
465 \xPSDesiredStateConfiguration\3.3.0.0\DSCResources\MSFT_xFileUpload\MSFT_xFileUpload.schema.psm1
223 \xSafeHarbor\1.0.0.1\Assert-SafeHarborScenario.ps1
226 \xSafeHarbor\1.0.0.1\Assert-SafeHarborScenario.ps1
240 \xSafeHarbor\1.0.0.1\Assert-SafeHarborScenario.ps1
243 \xSafeHarbor\1.0.0.1\Assert-SafeHarborScenario.ps1
256 \xSafeHarbor\1.0.0.1\Assert-SafeHarborScenario.ps1
259 \xSafeHarbor\1.0.0.1\Assert-SafeHarborScenario.ps1
59 \xSafeHarbor\1.0.0.1\SafeHarborHelper.psm1
24 \xSCOM\1.3.3.0\DSCResources\MSFT_xSCOMAdmin\MSFT_xSCOMAdmin.psm1
78 \xSCOM\1.3.3.0\DSCResources\MSFT_xSCOMAdmin\MSFT_xSCOMAdmin.psm1
33 \xSCOM\1.3.3.0\DSCResources\MSFT_xSCOMManagementPack\MSFT_xSCOMManagementPack.psm1
88 \xSCOM\1.3.3.0\DSCResources\MSFT_xSCOMManagementPack\MSFT_xSCOMManagementPack.psm1
400 \xSCOM\1.3.3.0\DSCResources\MSFT_xSCOMManagementServerSetup\MSFT_xSCOMManagementServerSetup.psm1
25 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFServer\MSFT_xSCSPFServer.psm1
82 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFServer\MSFT_xSCSPFServer.psm1
33 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFSetting\MSFT_xSCSPFSetting.psm1
102 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFSetting\MSFT_xSCSPFSetting.psm1
24 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFStamp\MSFT_xSCSPFStamp.psm1
49 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFStamp\MSFT_xSCSPFStamp.psm1
108 \xSCSPF\1.3.1.0\DSCResources\MSFT_xSCSPFStamp\MSFT_xSCSPFStamp.psm1
24 \xSCVMM\1.2.4.0\DSCResources\MSFT_xSCVMMAdmin\MSFT_xSCVMMAdmin.psm1
70 \xSCVMM\1.2.4.0\DSCResources\MSFT_xSCVMMAdmin\MSFT_xSCVMMAdmin.psm1
25 \xSCVMM\1.2.4.0\DSCResources\MSFT_xSCVMMOperationsManagerServer\MSFT_xSCVMMOperationsManagerServer.psm1
103 \xSCVMM\1.2.4.0\DSCResources\MSFT_xSCVMMOperationsManagerServer\MSFT_xSCVMMOperationsManagerServer.psm1
24 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPBCSServiceApp\MSFT_xSPBCSServiceApp.psm1
74 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPBCSServiceApp\MSFT_xSPBCSServiceApp.psm1
83 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPBCSServiceApp\MSFT_xSPBCSServiceApp.psm1
28 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCacheAccounts\MSFT_xSPCacheAccounts.psm1
79 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCacheAccounts\MSFT_xSPCacheAccounts.psm1
36 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
87 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
98 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
103 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
108 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
113 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
118 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
123 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPCreateFarm\MSFT_xSPCreateFarm.psm1
23 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDiagnosticLoggingSettings\MSFT_xSPDiagnosticLoggingSettings.psm1
123 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDiagnosticLoggingSettings\MSFT_xSPDiagnosticLoggingSettings.psm1
37 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDistributedCacheService\MSFT_xSPDistributedCacheService.psm1
98 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDistributedCacheService\MSFT_xSPDistributedCacheService.psm1
119 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDistributedCacheService\MSFT_xSPDistributedCacheService.psm1
125 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDistributedCacheService\MSFT_xSPDistributedCacheService.psm1
133 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPDistributedCacheService\MSFT_xSPDistributedCacheService.psm1
34 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPFeature\MSFT_xSPFeature.psm1
92 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPFeature\MSFT_xSPFeature.psm1
32 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
84 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
107 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
112 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
117 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
122 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
127 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPJoinFarm\MSFT_xSPJoinFarm.psm1
24 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedAccount\MSFT_xSPManagedAccount.psm1
78 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedAccount\MSFT_xSPManagedAccount.psm1
24 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedMetadataServiceApp\MSFT_xSPManagedMetaDataServiceApp.psm1
72 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedMetadataServiceApp\MSFT_xSPManagedMetaDataServiceApp.psm1
86 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedMetadataServiceApp\MSFT_xSPManagedMetaDataServiceApp.psm1
32 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedPath\MSFT_xSPManagedPath.psm1
83 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPManagedPath\MSFT_xSPManagedPath.psm1
24 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSearchServiceApp\MSFT_xSPSearchServiceApp.psm1
72 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSearchServiceApp\MSFT_xSPSearchServiceApp.psm1
87 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSearchServiceApp\MSFT_xSPSearchServiceApp.psm1
28 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSecureStoreServiceApp\MSFT_xSPSecureStoreServiceApp.psm1
101 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSecureStoreServiceApp\MSFT_xSPSecureStoreServiceApp.psm1
115 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSecureStoreServiceApp\MSFT_xSPSecureStoreServiceApp.psm1
24 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPServiceAppPool\MSFT_xSPServiceAppPool.psm1
60 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPServiceAppPool\MSFT_xSPServiceAppPool.psm1
25 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPServiceInstance\MSFT_xSPServiceInstance.psm1
64 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPServiceInstance\MSFT_xSPServiceInstance.psm1
74 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPServiceInstance\MSFT_xSPServiceInstance.psm1
24 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSite\MSFT_xSPSite.psm1
95 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPSite\MSFT_xSPSite.psm1
20 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPStateServiceApp\MSFT_xSPStateServiceApp.psm1
62 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPStateServiceApp\MSFT_xSPStateServiceApp.psm1
20 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUsageApplication\MSFT_xSPUsageApplication.psm1
88 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUsageApplication\MSFT_xSPUsageApplication.psm1
107 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUsageApplication\MSFT_xSPUsageApplication.psm1
26 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUserProfileServiceApp\MSFT_xSPUserProfileServiceApp.psm1
106 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUserProfileServiceApp\MSFT_xSPUserProfileServiceApp.psm1
27 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUserProfileSyncService\MSFT_xSPUserProfileSyncService.psm1
89 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPUserProfileSyncService\MSFT_xSPUserProfileSyncService.psm1
31 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPWebApplication\MSFT_xSPWebApplication.psm1
98 \xSharePoint\0.3.0.0\DSCResources\MSFT_xSPWebApplication\MSFT_xSPWebApplication.psm1
19 \xSharePoint\0.3.0.0\Modules\xSharePoint.Util\xSharePoint.Util.psm1
703 \xSQLServer\DSCResources\MSFT_xSQLServerFailoverClusterSetup\MSFT_xSQLServerFailoverClusterSetup.psm1
28 \xSQLServer\DSCResources\MSFT_xSQLServerRSConfig\MSFT_xSQLServerRSConfig.psm1
86 \xSQLServer\DSCResources\MSFT_xSQLServerRSConfig\MSFT_xSQLServerRSConfig.psm1
24 \xSQLServer\DSCResources\MSFT_xSQLServerRSSecureConnectionLevel\MSFT_xSQLServerRSSecureConnectionLevel.psm1
67 \xSQLServer\DSCResources\MSFT_xSQLServerRSSecureConnectionLevel\MSFT_xSQLServerRSSecureConnectionLevel.psm1

Posted By: Jeff Wouters
Last Edit: 20 Jul 2015 @ 08:00 AM

EmailPermalinkComments (4)
Tags
Categories: DevOps, DuPSUG, PowerShell





 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 356
  • Comments » 558
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Contact



    No Child Pages.

Speaking



    No Child Pages.

Health Check



    No Child Pages.