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

Reply To: File search – multiple remote servers – specific file...

Jake: I’ve written a one-liner as an example. It gets the computer names from a text file, then gets the files with the desired extensions on the system drive on each computer, gets the properties you...

View Article


Unavailable computers missing from get-service command

Hi, I am running a query to get the status of service againsts multiple machines. The command i am using is - Get-Service -name bits -ComputerName s1,s2,s3 | format-table MachineName,Name,Status...

View Article


Reply To: Unavailable computers missing from get-service command

Try this. 's1','s2'.'s3' | foreach { Get-Service -name bits -ComputerName $_ | format-table MachineName,Name,Status -AutoSize }

View Article

Reply To: Unavailable computers missing from get-service command

I tend to test like this $servers = “sphinxdc01″, “sphinxdsc01″, “sphinxtest” $servers | foreach { if (Test-Connection $psitem -Quiet -Count 1) { Get-Service bits -ComputerName $psitem | select...

View Article

Reply To: Installing an exe with Powershell DSC Package resource gets return...

Update… I ran “psexec.exe -s D:\Temp\NET4.5.1\NDP451-KB2858728-x86-x64-AllOS-ENU.exe /q /norestart /log d:\temp\ndp451-1″ and was able to install .NET 4.5.1. I looked at the .html log produced, and...

View Article


Encrypted Credentials in Push mode on Windows 7

I’m trying to use DSC to maintain configuration on a handful of shared servers. My plan is to put my DSC scripts into Source Control so anyone on my team can edit the configuration and ‘push’ it from...

View Article

Reply To: Encrypted Credentials in Push mode on Windows 7

I thought we’d covered this in The DSC Book, was it not? You need to include the certificate thumbprint that the node will use to decrypt the credentials – meaning the certificate itself must be...

View Article

Reply To: Encrypted Credentials in Push mode on Windows 7

Which method do you advise? Setting up a Pull server from a UNC share (I hope I don’t need admin access to the file server since I hope to use our company’s shared network-store) or pre-deploying some...

View Article


Reply To: Encrypted Credentials in Push mode on Windows 7

Well, two different things. Thing 1, you said you can’t have a Pull Server; a Pull Server can just be a file server if that makes the decision to use Pull a little easier. Thing 2, you have to...

View Article


Reply To: DSC and Separation of Duties

Composite configurations. The DSC Book covers them. Essentially, each admin gets their own config, which is exposed as a resource. A master, “composite” config, sucks them all in and produces the...

View Article

Reply To: DSC and Separation of Duties

Thanks Don, read the book ealier today (4am EST earlier) and must have missed that part, but got it now.

View Article

Reply To: two issues I noticed in get-alias

Your first example uses the “Name” positional parameter: [pre] get-alias ls [/pre] Which is the same as: [pre] Get-Alias -Name ls [/pre] With the second example you provided, you need to use a...

View Article

Reply To: Unavailable computers missing from get-service command

Another option: $Computername = 's1','s2','s3' $Name = 'bits' $Computername | ForEach-Object { $Computer = $_ Try { Get-Service -name $Name -ComputerName $Computer -ErrorAction Stop } Catch { $Object...

View Article


Reply To: PowerShell Desired State Configuration failed to register MOF file

Yes I used the resource designer toolkit to generate the MOF orginally and I just recreated it to test that I hadn’t made some sort of manual change at some point. I ran the Test-DSCSchema cmdlet on...

View Article

Reply To: Unavailable computers missing from get-service command

And yet another option: [pre] function Get-MrService { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [string[]]$ComputerName = ('s1','s2','s3'), [ValidateNotNullOrEmpty()]...

View Article


Reply To: Unavailable computers missing from get-service command

I tweaked my code since there’s no since in checking for additional services if the first attempt fails. [pre] function Get-MrService { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()]...

View Article

Reply To: PowerShell Desired State Configuration failed to register MOF file

Actually I think I have resolved it. The “Key” attribute must be the only attribute in the definition of that property. It seems if you define the type as “Hashtable” it creates a second attribute in...

View Article


Reply To: Unavailable computers missing from get-service command

Thanks Guys. It worked.

View Article

Module Manifest Help

I have created a module that requires the sqlps module in order to work. The module I have created is a module manifest. Within the module manifest i have the following line NestedModules = @(‘sqlps’,...

View Article

new-aduser error

Hi i wanted to create a script that will help me save time when i create a new user the script is a one-liner and goes like that : New-ADUser -Name (Read-Host “Name”) -GivenName (Read-Host...

View Article
Browsing all 13067 articles
Browse latest View live