PoshCode Archive  Artifact [5c24dd0ea6]

Artifact 5c24dd0ea6e1d3ca228e8a52c4e6a3455a5464f3ca1ea4f2905b29c0cdde346b:

  • File Show-Databases-on-server.ps1 — part of check-in [9f91081510] at 2018-06-10 14:05:25 on branch trunk — ############################################################################################# (user: Rob Sewell size: 1114)

# encoding: utf-8
# api: powershell
# title: Show Databases on server
# description: #############################################################################################
# version: 0.1
# type: function
# author: Rob Sewell
# license: CC0
# function: Show-DatabasesOnServer
# x-poshcode-id: 5984
# x-archived: 2016-05-17T10:49:44
# x-published: 2016-08-24T18:50:00
#
# #
# NAME: Show-DatabasesOnServer.ps1
# AUTHOR: Rob Sewell http://sqldbawithabeard.com
# DATE:22/07/2013
# #
# COMMENTS: Load function for finding a databases on Server
# 覧覧覧覧覧覧覧覧覧覧覧覧
#
 #############################################################################################
#
# NAME: Show-DatabasesOnServer.ps1
# AUTHOR: Rob Sewell http://sqldbawithabeard.com
# DATE:22/07/2013
#
# COMMENTS: Load function for finding a databases on Server
# 覧覧覧覧覧覧覧覧覧覧覧覧


Function Show-DatabasesOnServer ([string]$Server)
{
$srv = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $server

Write-Host " The Databases on $Server Are As Follows"
$srv.databases| Select Name
}