This is my environment
System A :BizTalk server 2010,SQL Server 2008 R2,PowerShell provider for Biztalk(1.0.2.4).
System B:PowerShell provider for Biztalk(1.0.2.4) and No BizTalk server and SQL server are installed .
I have created New PS drive and configured on System A.
I have to execute Powershell script on System B but i am not able access drive which is created on System A and also not
able create new drive through script on system B.
Script:
Enter-pssession -computername Dev1 -configurationname microsoft.powershell32
Function BizTalk: { Set-Location BizTalk: }
Function BizTalk:\ { Set-Location BizTalk:\ }
write-host "Loading PowerShell Provider for BizTalk snap-in "
$InitializeDefaultBTSDrive = $false;
Add-PSSnapin -Name BizTalkfactory.PowerShell.Extensions
New-PSDrive -Name BTS -PSProvider BizTalk -Root "BTS:\" -Instance Dev1-Database BizTalkMgmtDb -Scope Global
Set-Location -Path BTS:
Set-Location 'Platform Settings'
Set-Location 'Host Instances'
Get-ChildItem |Where-Object { $_.ServiceState -eq 'Stopped' } |Start-HostInstance
Error Message(For new drive in the script):
New-PSDrive : Invalid namespace
At E:\Utilities\StartHostInstances.ps1:13 char:19
+ New-PSDrive <<<< -Name BTS -PSProvider BizTalk -Root "BTS:\" -Instance Dev1 -Database BizTalkMgmtDb -Sco
pe Global
+ CategoryInfo : InvalidArgument: (BTS:PSDriveInfo) [New-PSDrive], BtsException
+ FullyQualifiedErrorId : 0,Microsoft.PowerShell.Commands.NewPSDriveCommand
I have used Get-PSDrive command but didn't find the drive .
If i set $InitializeDefaultBTSDrive = $true and getting following error message
Error Message:
Attempting to perform the InitializeDefaultDrives operation on the 'BizTalk' provider failed.
- Edited by kapil kumar velpuri Wednesday, October 30, 2013 12:32 PM