Comments (9)
Just droping the Administrator requiremend from the module resuls in this error
Start-LabConfiguration -ConfigurationData G:\VirtualEngineLab\en-US\Example.psd1 -Path G:\TestLab\Configurations
This Resource requires to be run as an Administrator.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DSCResources\MSFT_WindowsOptionalFeature\MSFT_WindowsOptionalFeature.psm1:277 char:9
+ throw $LocalizedData.ElevationRequired
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (This Resource r... Administrator.:String) [], RuntimeException
+ FullyQualifiedErrorId : This Resource requires to be run as an Administrator.
The only way to run as a basic user would be to require a credential parameter for an administrator account and then start additional powershell sessions running as the admin when it's required.
I like BITS, I wonder if there is another option to have bits run as system.
from lability.
I can verify that the underlying issue with runas other user for admin is inherent in bits
PS G:\temp> bitsadmin /create testjob
BITSADMIN version 3.0 [ 7.8.10240 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
BITSAdmin is deprecated and is not guaranteed to be available in future versions of Windows.
Administrative tools for the BITS service are now provided by BITS PowerShell cmdlets.
Created job {68B1C5E1-E682-4770-B678-24EA8B0AD69C}.
PS G:\temp> bitsadmin /addfile testjob http://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WI
NBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO g:\temp\test.iso
BITSADMIN version 3.0 [ 7.8.10240 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
BITSAdmin is deprecated and is not guaranteed to be available in future versions of Windows.
Administrative tools for the BITS service are now provided by BITS PowerShell cmdlets.
Unable to add file to job - 0x800704dd
The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist.
from lability.
Dropping Admin rights will cause issues, but it would permit you to download the resources!
I think it will be less confusing all round if we implement Invoke-WebRequest rather than BITS. Running some cmdlets as a standard user and others under a different context will just lead to a load of questions!
from lability.
Not looking good
WARNING: Unable to query CCM_ClientUtilities: Invalid namespace
Resource download failed: http://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBL
UE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO.
At G:\VirtualEngineLab\Lib\Resource.ps1:212 char:13
+ throw ($localized.ResourceDownloadFailedError -f $Uri);
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Resource downlo..._EN-US_DV9.ISO.:String) [], RuntimeException
+ FullyQualifiedErrorId : Resource download failed: http://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4F
E-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO.
from lability.
I think I traced it down to this
PS C:\WINDOWS\system32> [System.UInt32] $contentLength = $webClient.ResponseHeaders['Content-Length'];
Cannot convert value "4542291968" to type "System.UInt32". Error: "Value was either too large or too small for
a UInt32."
At line:1 char:13
+ [System.UInt32] $contentLength = $webClient.ResponseHeade ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [], ArgumentTransformationMetadataException
+ FullyQualifiedErrorId : RuntimeException
PS C:\WINDOWS\system32> $webClient.ResponseHeaders['Content-Length'];
4542291968
PS C:\WINDOWS\system32> "$([int32]::MinValue) to $([int32]::MaxValue)"
-2147483648 to 2147483647
from lability.
Changed UInt32 to UInt64, and it basically hung for a a bit then error our wit the same Resource download Failed error. but running the commands in InvokeWebClientDownload directly worked to download
from lability.
guess I spoke too soon, tried again with a clean PowerShell and it started downloading.
from lability.
Bottom line, you need Uint64 for the download progress calculations
from lability.
I'm closing this one out. If you still have problems with the Proxy server authentication, we can open another issue.
from lability.
Related Issues (20)
- Cache gets updated for DSC modules but not for other modules HOT 3
- Request: Add a Content tag to Resource instead of Uri HOT 4
- Machine stuck at boot after successful DSC configuration. HOT 12
- Improve error message for module versions that don't exist HOT 2
- Setting SecureBoot value per CustomMedia HOT 8
- Add support for using specific VM username when calling Start-LabConfiguration HOT 1
- Cert issue in v0.19.0 HOT 3
- McAfee DLP prevents Lability builds HOT 1
- Non-English ISO options HOT 33
- cannot -IgnorePendingReboot, build fails regardless
- New Release with Updated Media HOT 1
- Adding a new, empty virtual disk fails
- Remove Dependency on Dsc Resources from the PSDesiredStateConfiguration Version 1.1 Module HOT 2
- AuthenticodeIssuerMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.Pac kageManagement.Cmdlets.InstallPackage
- File Resource not connecting to network share HOT 2
- Windows Server 2022 media HOT 1
- Windows 11 22H2 Issue HOT 3
- URL for WIN11_x64_Enterprise_22H2_EN_Eval not working HOT 2
- Inconsistent uncompressing of ZIP files as resources
- Add support for Azure DevOps Artifact Feeds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lability.