Viewing 15 posts - 61 through 75 (of 972 total)
Not really, I have no environment to run this command in. What error are you getting?
January 8, 2016 at 2:43 pm
You will want to use the "-args" parameter for Invoke-Command.
Invoke-Command -Computer MYREMOTESERVER {Disable-NetAdapter –Name $NICName –Confirm:$false}
Would become
Invoke-Command -Computer MyRemoteServer { Disable-NetAdapter -Name $NICName -Confirm:$false } -Args $nic
The parameter name you...
January 7, 2016 at 7:23 pm
So this took me a bit to work out... TL;DR you can't use Invoke-SqlCmd to move data where milliseconds matters in your datetime data. The reasoning behind this as far...
December 29, 2015 at 9:14 pm
Yes....this should get you started:
$upd = new-object -com Microsoft.Update.Session "MyComputer"
$searcher = $upd.CreateUpdateSearcher()
$searcher
December 17, 2015 at 3:13 pm
Just make a new job and create each one of the "created" jobs from Ola's script as a step in the order you want them to run. Each of the...
December 14, 2015 at 10:19 am
It has nothing to do with escaping the period, because you have the object in single quotes PowerShell evaluates the object and is returning the type. You have to force...
December 14, 2015 at 2:57 am
Welsh Corgi (12/12/2015)
Shawn Melton (12/12/2015)
What is the log reuse description show for the database?Any open transactions or records returned for: DBCC OPENTRAN() WITH TABLERESULTS
No. I am the only one connected...
December 12, 2015 at 5:22 pm
What is the log reuse description show for the database?
Any open transactions or records returned for: DBCC OPENTRAN() WITH TABLERESULTS
December 12, 2015 at 3:55 pm
SQL Server A: Has Primary Availability Group A with Database 1, Database 2, and Database 3. Has Secondary Availability Group B with Database 4, Database 5, and Database 6.
SQL Server...
December 9, 2015 at 7:01 pm
$result= @()
ForEach-Object {Get-WmiObject -Class Win32_Service -ComputerName $InstanceName} | Where {$_.DisplayName -Match "SQL"} | Select Name, DisplayName, State, Startname
$result | Select Name, DisplayName, State, Startname |
Export-Csv -Path $fullpath -NoTypeInformation
Your $results variable...
December 8, 2015 at 7:22 am
Unless you had a copy/paste error with your code, the error you are getting has nothing to do with the property.
You are missing the opening curly brace for the "where"...
December 6, 2015 at 10:26 pm
Use the same line, just add the "-ComputerName".
This:
Get-WmiObject win32_service | where {$_.DisplayName -match "SQL Server"} | select Name, DisplayName, State, StartName
Equates to this for running it on my local machine:
Get-WmiObject...
November 23, 2015 at 4:10 pm
Getting service account being used is in the code I provided a few post back...
Get-WmiObject win32_service | where {$_.DisplayName -match "SQL Server"} | select Name, DisplayName, State, StartName
November 22, 2015 at 11:32 pm
At the moment, I have only listed one server in the txt file just for test purposes, and its basically..
FQDN\Instance, port
You have to provide the server name only with the...
November 22, 2015 at 9:46 pm
What is the format of your server text file, DevServers.txt?
Take 3 servers out of that list and just set them on the command line as:
$serverList = 'Server1','Server2','Server3'
Does that return any...
November 22, 2015 at 9:00 pm
Viewing 15 posts - 61 through 75 (of 972 total)