You should be using the command-line interface for Microsoft 365

Manage the Microsoft productivity cloud from your keyboard.

Program code bug screen glitch vector background
Image: Vector Tradition/Adobe Stock

Administering Microsoft 365 can be complex. Much of what you need to do can be done through its web portal, but there are times when you need something more interactive, using scripts and other tools to build repeatable actions. That’s what the command-line interface for Microsoft 365 is, a tool that helps you manage Microsoft 365 tenants from the command line, and which can be used programmatically from PowerShell, bash or your own choice of scripting environment.

The CLI for Microsoft 365 has been developed by the Microsoft 365 Platform Community, PnP. Run by both Microsoft staff and Microsoft 365 MVPs, the community was set up to share best practices and tools designed to support them.

SEE: Hiring kit: Back-end Developer (TechRepublic Premium)

Delivering a tool that brings much of Microsoft 365 management into the command line fits well with their ethos of not reinventing the wheel, as Microsoft 365 makes it easy to share scripts and queries that can help other admins solve their problems.

Getting started with the CLI for Microsoft 365

While most admins are likely to run the CLI from PowerShell on Windows, it’s built as a node.js JavaScript application and can be installed on Linux or macOS, working with any supported shell that can call local applications.

Installation is via npm, using it to manage updates and download beta test versions. It’s also available in a Linux Docker container, ready to run anywhere you have container support. There’s an interesting prospect here of using the CLI as the foundation of your own management UI for Microsoft 365, using JavaScript to call CLI commands and parse the JSON results.

It’s important to remember to check for updates regularly using npm’s tools. The team adds new features with each release as the Microsoft 365 API surface grows. If you don’t need to use it anymore, another npm call will uninstall the CLI.

The first time you run the CLI, use the m365 login command to authenticate against your tenant. This will take you through a web-based authorization procedure that sets the permissions needed to manage Microsoft 365 remotely. Once you accept the long list of required permissions, you’ll be dropped back into your Windows Terminal ready to go. Alternatively, you can log in with a username and password when interactive login isn’t an option.

Other features support using Azure Active Directory secrets, a useful option when building the CLI into your own scripts, though this currently won’t work for any scripts that need to work against SharePoint Online’s APIs.

Scripting Microsoft 365

Once set up, you can start to manage your Microsoft 365 instance. There are commands for working at different levels within the Microsoft 365 stack, from managing tenant settings to working with specific apps like OneDrive and Teams.

You can use the CLI for Microsoft 365 to collect information that helps you manage your applications and users. What’s perhaps more useful is the ability to build complex scripts around these queries, taking in parameters from one response and using them as inputs into another. So you can get a list of all current OneDrive stores, then use that to query how they’re using your storage budget. You could even automate emailing that result to the appropriate managers.

While there are commands for most Microsoft 365 applications and services, it’s not surprising that most of the commands in the CLI are for working with SharePoint Online. SharePoint remains an important part of the suite and a key tool for collaboration and communication in many organizations. With over 260 commands focused on managing SharePoint, it’s an essential tool for any SharePoint admin. Being able to work with SharePoint programmatically is a big time saver, and the growing library of commands in the CLI cover much of what you need to do.

There’s over 60 commands dedicated to working with Teams. You can dynamically manage apps, users and channels while also being able to automate sending messages to a chat or take data from a script and embed it in an adaptive card for quick interactions. It’s possible to imagine a basic chatbot calling a CLI script and returning requested data, allowing you to manage your Microsoft 365 tenants without leaving a meeting or from inside an ongoing team chat.

Filtering and using query results

Commands that return data default to using the JSON format. This is fine if you’re building CLI commands into scripts and want to use PowerShell’s JSON tooling to format outputs. However, if you’re making a quick query, it’s not particularly human readable, so you have the option of choosing text or CSV outputs. The last option is a good one to choose if you’re getting data for a large estate of, say, mailboxes, and you want to import data into Excel for further analyses or reports. CSV outputs will allow you to feed data into tools like Power BI to run dashboards and other visualizations.

You’re able to filter output too by using queries to extract the data you want. The query language used is based on the JMESPath JSON tool and owes a lot to familiar regular expression tools. Usefully, there’s a test tool on the JMESPath site that can help you format the query you need to use to get the data you want. As well as filtering data, you’re able to sort and order it, helping bring relevant results to the top of a response without having to write your own sorting functions.

If you’re not quite sure what command to use, there’s support for command completion using the Clink tooling for most command-line environments. Alternatively, a single line of PowerShell will add command completion for PowerShell’s own terminal.

Web-based management portals like Microsoft 365’s are a useful tool, but if you want to do more than apply basic settings to users or configure applications, then a command line tool like this makes a lot more sense, especially when you can use it to programmatically manage your tenants and users. With cross platform support, it’s a tool that goes where you are, ensuring that it doesn’t get in your way and fits with your toolchain and workflow. The result is an essential tool for anyone who has to manage Microsoft 365 and SharePoint Online.

Source link

istanbul escort aksaray escort arnavutköy escort ataköy escort avcılar escort avcılar türbanlı escort avrupa yakası escort bağcılar escort bahçelievler escort bahçeşehir escort bakırköy escort başakşehir escort bayrampaşa escort beşiktaş escort beykent escort beylikdüzü escort beylikdüzü türbanlı escort beyoğlu escort büyükçekmece escort cevizlibağ escort çapa escort çatalca escort esenler escort esenyurt escort esenyurt türbanlı escort etiler escort eyüp escort fatih escort fındıkzade escort florya escort gaziosmanpaşa escort güneşli escort güngören escort halkalı escort ikitelli escort istanbul escort kağıthane escort kayaşehir escort küçükçekmece escort mecidiyeköy escort merter escort nişantaşı escort sarıyer escort sefaköy escort silivri escort sultangazi escort suriyeli escort şirinevler escort şişli escort taksim escort topkapı escort yenibosna escort zeytinburnu escort porno 1080p porno izle 4k porno izle 720p porno izle abella danger alman alman porno alman porno izle aloha tube porno amatör amatör porno amatör porno izle anal anal porno anal porno izle arap porno asa akira porno asyalı porno bangbros porno bangbros porno izle banyoda sikis başörtülü porno beeg porno izle beyaz tenli porno izle biseksuel porno izle bisexsuel porno brandi love porno brazzers brazzers porno izle canli porno canli porno izle çinli porno çinli porno izle ensest porno ensest porno izle ensest seks erotik porno erotik porno izle esmer porno esmer porno izle etek altı fake agent fake taxi fake taxi porno fantazi pornoları fantezi porno izle fetiş porno fetiş porno izle fetish fransız porno fransız porno izle full hd hg porno izle gangbang porno genç kız porno izle genç kız sikişi genç teen porno izle gizli çekim porno gizli çekim pornosu grup pornosu grup porno grup porno izle hd pornolar hd porno hd porno izle hemşire porno hemşire pornosu hizmetçi porno hizmetçi porno izle ingiliz porno japon pornoları japon porno kızlık bozma kızlık bozma porno izle konulu porno konulu porno izle koreli porno köylü pornoları kumral porno kumral porno izle latin pornoları latin porno latin porno izle lezbiyen pornoları lezbiyen porno lezbiyen porno izle lisa ann porno liseli pornoları liseli porno liseli porno izle manken porno manken porno izle masaj porno izle masturbasyon porno izle masturbasyon pornoları mature porno mia khalifa porno mia malkova porno milf porno izle mobil porno mobil porno izle öğrenci porno izle öğretmen porno izle okul porno izle olgun kadın pornosu olgun porno oral porno oral porno izle oral seks porna izle pornhub pornhub porno izle porno film izle porno indir porno izle porno resimler porno star porntube porno izle redtube redtube pornoları riley reid porno rokettube rus pornoları rus porno rus porno izle sakso blowjob porno izle sarışın pornoları sarışın porno sarışın porno izle sarışın pornoları sekreter porno shemale sikiş sikiş sikiş izle şişman porno siyahi pornoları suriyeli pornoları swinger porno tecavüz porno teen porn türbanlı pornoları türbanlı porno türk pornoları türk porno türk porno izle türkçe altyazılı porno türkçe altyazılı porno izle xhamster pornoları xhamster porno xhamster porno izle xnxx xnxx porno xnxx porno izle xvideos xvideos porno izle yaşlı porno yeşilçam porno izle youjizz youporn youporn porno izle zenci porno güvenilir bahis siteleri bahis siteleri casino deneme bonusu casino siteleri deneme bonusu para yatırma bonusu bahis siteleri casino siteleribahis sitesi para yatırma