Skip to content

Commit 3343855

Browse files
authored
Merge pull request #6 from solutionexchange/DOTNET-2368
Dotnet 2368
2 parents b7a3acb + a031972 commit 3343855

12 files changed

Lines changed: 610 additions & 3 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Function Get-MSPublicationPackageInformationData {
2+
<#
3+
.SYNOPSIS
4+
Listing informational data of Publication Package
5+
.DESCRIPTION
6+
You can list all informational data from a publication package wit the given Guid
7+
#>
8+
[Alias('Get-CMSPublicationPackageInformationData')]
9+
[CmdletBinding()]
10+
param(
11+
[Parameter(
12+
Position = 0,
13+
Mandatory = $true,
14+
ParameterSetName = 'byMSSession'
15+
)]
16+
[string] $PublicationPackageGUID
17+
)
18+
begin {
19+
Write-Debug -Message ("[ Enter => function {0} ]" -f $MyInvocation.MyCommand);
20+
}
21+
process {
22+
Write-Debug -Message ("[ Process => function {0} ]" -f $MyInvocation.MyCommand);
23+
Set-MSTimestamp;
24+
$Request = ("<IODATA loginguid='[!guid_login!]' sessionkey='[!key!]'><PROJECT><EXPORTPACKET action='loadpacket' guid='[!guid_exportpacket!]' /></PROJECT></IODATA>").Replace("[!guid_exportpacket!]", ($PublicationPackageGUID|ConvertTo-RQLGuid));
25+
$Request = Import-MSSessionProperties -Request ($Request);
26+
[xml]$Response = Invoke-MSRQLRequest -Request ($Request);
27+
Show-MSSessionWebServiceDebug;
28+
return $Response;
29+
}
30+
end {
31+
Write-Debug -Message ("[ Leave => function {0} ]" -f $MyInvocation.MyCommand);
32+
}
33+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Function Set-MSPublishingTargetForPublicationCombination {
2+
<#
3+
.SYNOPSIS
4+
Defining Publishing Targets for Publication Combination
5+
.DESCRIPTION
6+
You can specify an existing publishing target for each publication combination. The published pages will be published to this target.
7+
#>
8+
[Alias('Set-CMSPublishingTargetForPublicationCombination')]
9+
[CmdletBinding(DefaultParameterSetName = 'byMSSession')]
10+
param(
11+
[Parameter(
12+
Position = 0,
13+
Mandatory = $true,
14+
ParameterSetName = 'byMSSession'
15+
)]
16+
[string] $PublicationCombinationGuid,
17+
[Parameter(
18+
Position = 1,
19+
Mandatory = $true,
20+
ParameterSetName = 'byMSSession'
21+
)]
22+
[string] $PublishingTargetGuid
23+
)
24+
begin {
25+
Write-Debug -Message ("[ Enter => function {0} ]" -f $MyInvocation.MyCommand);
26+
}
27+
process {
28+
Write-Debug -Message ("[ Process => function {0} ]" -f $MyInvocation.MyCommand);
29+
Set-MSTimestamp;
30+
$Request = ("<IODATA loginguid='[!guid_login!]' sessionkey='[!key!]'><PROJECT><EXPORTSETTING guid='[!guid_exportsetting!]'><EXPORTTARGETS action='save'><EXPORTTARGET guid='[!guid_exporttarget!]' selected='1' /></EXPORTTARGETS></EXPORTSETTING></PROJECT></IODATA>")
31+
$Request = $Request.Replace("[!guid_exportsetting!]", $PublicationCombinationGuid)
32+
$Request = $Request.Replace("[!guid_exporttarget!]", $PublishingTargetGuid)
33+
$Request = Import-MSSessionProperties -Request ($Request)
34+
[xml]$Response = Invoke-MSRQLRequest -Request ($Request);
35+
Show-MSSessionWebServiceDebug;
36+
return $Response;
37+
}
38+
end {
39+
Write-Debug -Message ("[ Leave => function {0} ]" -f $MyInvocation.MyCommand);
40+
}
41+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Function Get-MSPublicationTargetData {
2+
<#
3+
.SYNOPSIS
4+
Listing Publication Packages
5+
.DESCRIPTION
6+
You can list all existing publication packages in a project with name and GUID.
7+
.NOTES
8+
RQL: Listing Publication Packages, Software version >= 5.0
9+
#>
10+
[Alias('Get-CMSPublicationTargetData')]
11+
[CmdletBinding()]
12+
param(
13+
[Parameter(
14+
Position = 0,
15+
Mandatory = $true,
16+
ParameterSetName = 'byMSSession'
17+
)]
18+
[string] $PublicationTargetGUID
19+
)
20+
begin {
21+
Write-Debug -Message ("[ Enter => function {0} ]" -f $MyInvocation.MyCommand);
22+
}
23+
process {
24+
Write-Debug -Message ("[ Process => function {0} ]" -f $MyInvocation.MyCommand);
25+
Set-MSTimestamp;
26+
$Request = ("<IODATA loginguid='[!guid_login!]' sessionkey='[!key!]'><PROJECT sessionkey='[!key!]'><EXPORT guid='[!guid_export!]' action='load'/></PROJECT></IODATA>").Replace("[!guid_export!]", ($PublicationTargetGUID|ConvertTo-RQLGuid));
27+
$Request = Import-MSSessionProperties -Request ($Request);
28+
[xml]$Response = Invoke-MSRQLRequest -Request ($Request);
29+
Show-MSSessionWebServiceDebug;
30+
return $Response;
31+
}
32+
end {
33+
Write-Debug -Message ("[ Leave => function {0} ]" -f $MyInvocation.MyCommand);
34+
}
35+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Function Get-MSPublishingTargets {
2+
<#
3+
.SYNOPSIS
4+
Listing publishing targets
5+
.DESCRIPTION
6+
You can list all existing publishing targets in a project with name, GUID, path and type
7+
.NOTES
8+
RQL: Listing publishing targets, Software version >= 5.0
9+
#>
10+
[Alias('Get-CMSPublishingTargets')]
11+
[CmdletBinding()]
12+
param()
13+
begin {
14+
Write-Debug -Message ("[ Enter => function {0} ]" -f $MyInvocation.MyCommand);
15+
}
16+
process {
17+
Write-Debug -Message ("[ Process => function {0} ]" -f $MyInvocation.MyCommand);
18+
Set-MSTimestamp;
19+
$Request = "<IODATA loginguid='[!guid_login!]' sessionkey='[!key!]'><PROJECT><EXPORTS action='list' /></PROJECT></IODATA>"
20+
$Request = Import-MSSessionProperties -Request ($Request);
21+
[xml]$Response = Invoke-MSRQLRequest -Request ($Request);
22+
Show-MSSessionWebServiceDebug;
23+
return $Response;
24+
}
25+
end {
26+
Write-Debug -Message ("[ Leave => function {0} ]" -f $MyInvocation.MyCommand);
27+
}
28+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
Function New-MSSftpPublicationPackage {
2+
<#
3+
.SYNOPSIS
4+
Creates a new SFTP Publication Package
5+
.DESCRIPTION
6+
Creates a new SFTP Publication Package with the given data.
7+
#>
8+
[Alias('New-CMSSftpPublicationPackage')]
9+
[CmdletBinding(DefaultParameterSetName = 'byMSSession')]
10+
param(
11+
[Parameter(
12+
Position = 0,
13+
Mandatory = $true,
14+
ParameterSetName = 'byMSSession'
15+
)]
16+
[string] $Name,
17+
[Parameter(
18+
Position = 1,
19+
Mandatory = $true,
20+
ParameterSetName = 'byMSSession'
21+
)]
22+
[int] $NoBOM,
23+
[Parameter(
24+
Position = 2,
25+
Mandatory = $true,
26+
ParameterSetName = 'byMSSession'
27+
)]
28+
[string] $ReplaceCrlfWithLfinPublishedFile,
29+
[Parameter(
30+
Position = 3,
31+
Mandatory = $true,
32+
ParameterSetName = 'byMSSession'
33+
)]
34+
[string] $Username,
35+
[Parameter(
36+
Position = 4,
37+
Mandatory = $true,
38+
ParameterSetName = 'byMSSession'
39+
)]
40+
[string] $Password,
41+
[Parameter(
42+
Position = 5,
43+
Mandatory = $true,
44+
ParameterSetName = 'byMSSession'
45+
)]
46+
[string] $Path,
47+
[Parameter(
48+
Position = 6,
49+
Mandatory = $true,
50+
ParameterSetName = 'byMSSession'
51+
)]
52+
[string] $Port,
53+
[Parameter(
54+
Position = 7,
55+
Mandatory = $true,
56+
ParameterSetName = 'byMSSession'
57+
)]
58+
[AllowEmptyString()]
59+
[string] $UrlPrefix,
60+
[Parameter(
61+
Position = 8,
62+
Mandatory = $true,
63+
ParameterSetName = 'byMSSession'
64+
)]
65+
[string] $Fingerprint,
66+
[Parameter(
67+
Position = 9,
68+
Mandatory = $true,
69+
ParameterSetName = 'byMSSession'
70+
)]
71+
[string] $KeyFile,
72+
[Parameter(
73+
Position = 10,
74+
Mandatory = $true,
75+
ParameterSetName = 'byMSSession'
76+
)]
77+
[string] $KeyFilePassword
78+
)
79+
begin {
80+
Write-Debug -Message ("[ Enter => function {0} ]" -f $MyInvocation.MyCommand);
81+
}
82+
process {
83+
Write-Debug -Message ("[ Process => function {0} ]" -f $MyInvocation.MyCommand);
84+
Set-MSTimestamp;
85+
$Request = ("<IODATA loginguid='[!guid_login!]' sessionkey='[!key!]'><PROJECT><EXPORT action='addnew' type='6208' nobom='[!nobom!]' replacecrlfwithlfinpublishedfile='[!replacecrlfwithlfinpublishedfile!]' name='[!export_name!]' username='[!username!]' password='[!password!]' path='[!path!]' port='[!port!]' urlprefix='[!urlprefix!]' fingerprint='[!fingerprint!]' keyfile='[!keyfile!]' keyfilepassword='[!keyfilepassword!]' proxytype='0'/></PROJECT></IODATA>")
86+
$Request = $Request.Replace("[!nobom!]", $NoBOM)
87+
$Request = $Request.Replace("[!replacecrlfwithlfinpublishedfile!]", $ReplaceCrlfWithLfinPublishedFile)
88+
$Request = $Request.Replace("[!export_name!]", $Name)
89+
$Request = $Request.Replace("[!username!]", $Username)
90+
$Request = $Request.Replace("[!password!]", $Password)
91+
$Request = $Request.Replace("[!path!]", $Path)
92+
$Request = $Request.Replace("[!port!]", $Port)
93+
$Request = $Request.Replace("[!urlprefix!]", $UrlPrefix)
94+
$Request = $Request.Replace("[!fingerprint!]", $Fingerprint)
95+
$Request = $Request.Replace("[!keyfile!]", $KeyFile)
96+
$Request = $Request.Replace("[!keyfilepassword!]", $KeyFilePassword)
97+
$Request = Import-MSSessionProperties -Request ($Request)
98+
[xml]$Response = Invoke-MSRQLRequest -Request ($Request);
99+
Show-MSSessionWebServiceDebug;
100+
return $Response;
101+
}
102+
end {
103+
Write-Debug -Message ("[ Leave => function {0} ]" -f $MyInvocation.MyCommand);
104+
}
105+
}

0 commit comments

Comments
 (0)