November 6, 2014 at 6:14 am
and you would be assuming that "ls" is correctly configured as an alias to "Get-ChildItem". Maybe only 99.994% correct.
November 6, 2014 at 6:36 am
Raghavendra Mudugal (11/4/2014)
(to my knowledge..) DIR is a DOS command which also can be used in PS without aliasing. Once you connect to the SQLPS use the CD command to change the path and use the DIR to list the directories or the LS( "ls") command at each stage.
You are correct that you can use either of these commands as well. Powershell comes with the DOS and *ux shell commands already set up as aliases.
To get a full list of the aliases defined use the Get-Alias commandlet. If you want to find out the details for a particular alias, use Get-Alias {command}. i.e. Get-Alias Dir
As far as I know all of the powershell commandlets work when connected to SQLPS, and I have used Set-Location and Get-ChildItem successfully when interrogating my SQL Databases.
November 6, 2014 at 1:48 pm
Andy sql (11/6/2014)
and you would be assuming that "ls" is correctly configured as an alias to "Get-ChildItem". Maybe only 99.994% correct.
Touché! But of course the assumption is that the MS documentation that says "ls" is indeed configured like that is correct, and as it's a statement on a BOL page I would put the probability that it is actually correct a little lower than 99.994%, say about 99.5% (or maybe even lower). 😀
Tom
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply