You are here

Error message

  • Deprecated function: Array and string offset access syntax with curly braces is deprecated in include_once() (line 20 of /home/benjfc5/public_html/main/includes/file.phar.inc).
  • Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1387 of /home/benjfc5/public_html/main/includes/bootstrap.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/benjfc5/public_html/main/includes/common.inc).

powershell

PowerShell - Getting All Running SQL Services

Getting all SQL Server services running on a server using PowerShell:

PowerShell - Making Arrays

The basics of creating a PowerShell array and working with it.

PowerShell - Find Active Node On Cluster

PowerShell script that prints out the state of the node you are on - Active or Passive.

PowerShell - Query Database Remotely

The basic syntax for sending a query to SQL Server using PowerShell.

WMI and PowerShell (Video)

PowerShell - Get Boot Time of Computer

Show Date/Time Of Last Boot

​Get-WmiObject -class Win32_OperatingSystem | Select-Object __SERVER,@{label='LastBootUpTime';expression={$_.ConvertToDateTime($_.LastBootUpTime)}}

PowerShell - Scripts Not Allowed To Run

If PowerShell is not allowing you to run scripts then you might need to set the execution policy.
Set-ExecutionPolicy RemoteSigned
https://technet.microsoft.com/en-us/library/ee176961.aspx

PowerShell - Fast Ping

Source: https://gist.github.com/mbrownnycnyc/9913361

This is a very fast way to ping a server using PowerShell.

PowerShell - Get SQL Server Info

$assemblylist = 
"Microsoft.SqlServer.Management.Common",
"Microsoft.SqlServer.Smo",
"Microsoft.SqlServer.Dmf ",
"Microsoft.SqlServer.Instapi ",
"Microsoft.SqlServer.SqlWmiManagement ",
"Microsoft.SqlServer.ConnectionInfo ",
"Microsoft.SqlServer.SmoExtended ",
"Microsoft.SqlServer.SqlTDiagM ",
"Microsoft.SqlServer.SString ",
"Microsoft.SqlServer.Management.RegisteredServers ",
"Microsoft.SqlServer.Management.Sdk.Sfc ",
"Microsoft.SqlServer.SqlEnum ",
"Microsoft.SqlServer.RegSvrEnum ",
"Microsoft.SqlServer.WmiEnum ",
"Microsoft.SqlServer.ServiceBrokerEnum ",

PowerShell - Replace All Instances Of Something In All Files In Directory

This script searches every file in a directory for a particular string and replaces it with another value.
get-childItem  | ForEach { (Get-Content $_ | ForEach {$_ -replace "OLDVALUE,"NEWVALUE"}) | Set-Content $_}

Pages

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer