All Projects → microsoft → Iis.administration

microsoft / Iis.administration

Licence: other
REST API for managing IIS

Projects that are alternatives of or similar to Iis.administration

NetgenAdminUIBundle
Netgen Admin UI implements an alternate administration UI for eZ Platform, based on eZ Publish Legacy administration interface
Stars: ✭ 33 (-92.16%)
Mutual labels:  administration
easy-admin
Scripts for easy system administration
Stars: ✭ 20 (-95.25%)
Mutual labels:  administration
Nginx Admin
Nginx admin is an open source multiplatform manager for nginx software to easy administration
Stars: ✭ 294 (-30.17%)
Mutual labels:  administration
viur-vi
Visual administration interface for ViUR as web-app, with the ability to generate its input masks and data structures automatically from the underlying data model.
Stars: ✭ 18 (-95.72%)
Mutual labels:  administration
Maus
Lightweight remote administrative client written in Java.
Stars: ✭ 74 (-82.42%)
Mutual labels:  administration
resources
Open Mainframe Project Mentorship Program resources
Stars: ✭ 84 (-80.05%)
Mutual labels:  administration
silverstripe-catalogmanager
Catalog administration via a LeftAndMain like interface. Lets you create and edit pages outside of the site tree
Stars: ✭ 36 (-91.45%)
Mutual labels:  administration
Mcrcon
Rcon client for Minecraft
Stars: ✭ 350 (-16.86%)
Mutual labels:  administration
Linux-admin
Shell scripts to automate download of GitHub traffic statistics, cluster administration, and create an animated GIF.
Stars: ✭ 23 (-94.54%)
Mutual labels:  administration
Django Jet
Modern responsive template for the Django admin interface with improved functionality. We are proud to announce completely new Jet. Please check out Live Demo
Stars: ✭ 3,207 (+661.76%)
Mutual labels:  administration
rcon-web-admin
Self hosted, online RCON administration tool for your game server.
Stars: ✭ 70 (-83.37%)
Mutual labels:  administration
git-admin
A package to help manage git repositories through the commandline
Stars: ✭ 27 (-93.59%)
Mutual labels:  administration
Otter
A relatively automatic CRUD backend administration panel for Laravel
Stars: ✭ 261 (-38%)
Mutual labels:  administration
pace
Remote Access Tool for Windows.
Stars: ✭ 68 (-83.85%)
Mutual labels:  administration
Grav Plugin Admin
Grav Admin Plugin
Stars: ✭ 316 (-24.94%)
Mutual labels:  administration
Ketarin
Ketarin - application download helper
Stars: ✭ 89 (-78.86%)
Mutual labels:  administration
pc guidelines
Guidelines for using IvLabs PC. General instructions for maintaining and using any PC/laptop while using Ubuntu for Robotics/DL/RL research.
Stars: ✭ 23 (-94.54%)
Mutual labels:  administration
Btrfsmaintenance
Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.
Stars: ✭ 362 (-14.01%)
Mutual labels:  administration
Jarves
Jarves CMS/Application Framework based on Symfony - Alpha material
Stars: ✭ 325 (-22.8%)
Mutual labels:  administration
Rosariosis
RosarioSIS Student Information System for school management.
Stars: ✭ 282 (-33.02%)
Mutual labels:  administration

Microsoft IIS Administration API

Build status

To find the latest news for the IIS Administration api visit the blog at https://blogs.iis.net/adminapi.

Documentation is available at https://docs.microsoft.com/en-us/IIS-Administration

Installation:

  • Supports 64 bit Windows Server 2008 R2 and above

The latest installer can be obtained from https://manage.iis.net/get. The installer will automatically download and install all dependencies.

Nano Server Installation:

There is a blog post to get up and running on Nano Server located at https://blogs.iis.net/adminapi/microsoft-iis-administration-on-nano-server.

Running Tests:

  • Run the ConfigureDevEnvironment script with the test environment flag C:\src\repos\IIS.Administration\scripts\Configure-DevEnvironment.ps1 -ConfigureTestEnvironment
  • Open the project in Visual Studio as an Administrator and launch without debugging
  • Open another instance of the project and run the tests located in the 'test' folder
  • Tests can also be run with the CLI

Publish and Install:

Publishing and installing can be done through a PowerShell script. This requires the .NET Core SDK and Bower.

# Replace the path to match your clone location
C:\src\repos\IIS.Administration\scripts\publish\publish.ps1
C:\src\repos\IIS.Administration\scripts\publish\bin\setup\setup.ps1 Install -Verbose

Develop and Debug in Visual studio 2017:

  • Clone this project
  • Load the project in visual studio
  • Try restoring all the NuGet packages
  • Run PowerShell as an Administrator
  • Run Configure-DevEnvironment.ps1 script in the scripts dir
  • From the visual studio run profile menu select option Microsoft.IIS.Administration and run the application.
  • If you are not able to browse the site or your getting generic browser error, most like SSL certificate is not configured for that. IIS express installs SSL certificates on port 44300-44399. Try changing the port to one of these in appsettings.json ex: "urls":"https://*:44326"

Using the new API

  1. Navigate to https://manage.iis.net
  2. Click 'Get Access Token'
  3. Generate an access token and copy it to the clipboard
  4. Exit the access tokens window and return to the connection screen
  5. Paste the access token into the Access Token field of the connection screen
  6. Click 'Connect'

Examples

C#

Intialize Api Client

var apiClient = new HttpClient(new HttpClientHandler() {
   UseDefaultCredentials = true
}, true);

// Set access token for every request
apiClient.DefaultRequestHeaders.Add("Access-Token", "Bearer {token}");

// Request HAL (_links)
apiClient.DefaultRequestHeaders.Add("Accept", "application/hal+json");

Get Web Sites

var res = await apiClient.GetAsync("https://localhost:55539/api/webserver/websites");

if (res.StatusCode != HttpStatusCode.OK) {
  HandleError(res);
  return;
}

JArray sites = JObject.Parse(res.Content.ReadAsStringAsync().Result).Value<JArray>("websites");

Create a Web Site


var newSite = new {
  name = "Contoso",
  physical_path = @"C:\inetpub\wwwroot",
  bindings = new object[] {
    new {
      port = 8080,
      protocol = "http",
      ip_address = "*"
    }
  }
};

res = await apiClient.PostAsync("https://localhost:55539/api/webserver/websites", 
    new StringContent(JsonConvert.SerializeObject(newSite), Encoding.UTF8, "application/json"));

if (res.StatusCode != HttpStatusCode.Created) {
    HandleError(res);
    return;
}

JObject site = JObject.Parse(res.Content.ReadAsStringAsync().Result);

Update a Web Site


var updateObject = new {
  bindings = new object[] {
    new {
      port = 8081,
      protocol = "http",
      ip_address = "*"
    }
  }
};

var updateRequest = new HttpRequestMessage(new HttpMethod("PATCH"),
    "https://localhost:55539" + site["_links"]["self"].Value<string>("href"));

updateRequest.Content = new StringContent(JsonConvert.SerializeObject(updateObject), Encoding.UTF8, "application/json");

res = await apiClient.SendAsync(updateRequest);

if (res.StatusCode != HttpStatusCode.OK) {
    HandleError(res);
    return;
}

site = JObject.Parse(res.Content.ReadAsStringAsync().Result);

Delete a Web Site

res = await apiClient.DeleteAsync("https://localhost:55539" + site["_links"]["self"].Value<string>("href"));

PowerShell

There is a utils.ps1 script that demonstrates how to generate an access token from PowerShell.

# Replace the path to match your clone location
$accessToken = C:\src\repos\IIS.Administration\scripts\utils\utils.ps1 Generate-AccessToken -url "https://localhost:55539"

Get Web Sites

# Supply an access token to run the example

$accessToken = "{Some Access token}"

$headers = @{ "Access-Token" = "Bearer $accessToken"; "Accept" = "application/hal+json" }

$response = Invoke-RestMethod "https://localhost:55539/api/webserver/websites" -UseDefaultCredentials -Headers $headers

$response.websites
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].