Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Reply To: Configuration "chicken and egg" problem

That’s what DependsOn is for. It keeps the later items from processing until earlier ones do. There are examples in The DSC Book.

View Article


Reply To: Configuration "chicken and egg" problem

If your using Composite resources, can you use DependsOn in one Resource for a configuration item in another?

View Article


Reply To: Configuration "chicken and egg" problem

So, config “A” is the top-level composite. It includes “B” and “C” configs. Config “A” contains item 1, 2, and 3. Number 2 is actually config B, Number 3 is actually config C. Item 1 can depend on...

View Article

Reply To: Media for the Summit?

The logo at http://powershell.org/wp/community-events/summit/ is the only “generic” one at the moment. I haven’t made one up for the Europe show yet.

View Article

Reply To: Searching for device information

If you have something specific you’re after, it’d help to just start with one thing. Some of what you’re asking for – like “product key extraction from all software installed” – isn’t possible. But if...

View Article


Reply To: Hyper-V cmdlets without Administrator rights

PowerShell doesn’t “know” what cmdlets you have access to, so no. Read “Secrets of PowerShell Remoting.” It explain how permissions work to connect to a Remoting endpoint (you don’t need to be a...

View Article

Reply To: GuardRail and DSC

Seems not, sorry.

View Article

Reply To: Organizational Chart using PowerShell

You’re probably running into trouble because you’re trying to do this all in one line. Consider breaking this out into more of a script. You’ll get more control, and more opportunity to tweak the data...

View Article


Reply To: How to set the profile for PS for web access

You cannot. Remoting does not load profile scripts. You would need to set up a custom endpoint.

View Article


Reply To: Testing a DSC Resource

Unit testing as you suggest is probably the best place to start.

View Article

Reply To: Configuration "chicken and egg" problem

Makes sense, thanks

View Article

Checking if computer does not exists

We have thousands of systems and delete them after not talking to sccm’s heartbeat usually, but with that sccm keeps the computer in its database for 30 days or so. So when we push a patch/program we...

View Article

Custom DSC resources

Hello, I’m reading the free DSC book and got very curious whether the followings are right or not: It seems to me that DSC is going to replace group policy, since they both have the same purpose. Is...

View Article


Reply To: Checking if computer does not exists

Hello Eric, A possible solution for you would be to trap the exception thrown by Get-ADComputer and remove the device from SCCM in the catch block. Example: $ComputerName = 'MyTest' $Domain =...

View Article

Reply To: Checking if computer does not exists

Try something like this $ErrorActionPreference = ‘SilentlyContinue’ if (-not $( Get-ADComputer -Identity “bleh”)){ Write-Host “Doesn’t exist”} $ErrorActionPreference = ‘Continue’ You can get the if...

View Article


Reply To: Custom DSC resources

Long-term, DSC could potentially replace Group Policy. As for the value of certification, that values greatly and depends on the value your organization places on certification.

View Article

Reply To: Examples running SQL Stored Procedures from Powershell with Output...

Sorry – seems like nobody’s been trying that here. This is really just .NET Framework – I’m betting a search or post on StackOverflow.com would help!

View Article


Get-DSCResource Error

If I get an error mentioning v1.0 when running Get-DSCResource for the first time in PowerShell v4 (as shown below) can you tell me what I am doing wrong? (This is on x64 Windows 7 and I’m working...

View Article

Reply To: Get-DSCResource Error

Microsoft included “v1.0″ in the default path to PowerShell’s installation directory originally, and now they’re sort of stuck with it. You can ignore that part. That said, I’m not sure what’s causing...

View Article

Reply To: Get-DSCResource Error

Thanks Dave. It looks like it is an issue running get-command rather than an issue running get-dscresource. I’ve only recently upgraded to v4. I do have SQL Server on this machine, which may have some...

View Article
Browsing all 13067 articles
Browse latest View live