This repository is for macOS Intune sample scripts and custom configuration profiles. There are many cases where it is necessary to use a custom profile or shell script to accomplish a task.
To get started, check out the following documentation
To make things a little easier to navigate the repo has been split up into three main sections:
This section is for scripts that install or configure applications on the Mac. There are many reasons to deploy apps via shell script rather than via the macOS mdmclient. Our preferred method of app deployment is via the Mac App Store VPP, but the Intune Scripting agent provides an almost infinte level of possibilities where the apps you need on your Macs can't be deployed via VPP.
|-Apps
|---Cisco AMP
|---Company Portal
|---Defender
|---Edge
|---Gimp
|---Minecraft Education Edition
|---Office for Mac
|---Remote Desktop
|---Skype for Business
|---Teams
|---Visual Studio Code
|---Yammer
|---Zoom
|---gitHub Desktop
This section is for scripts that do general macOS configurations. This is an Alladin's cave of scripts to get your Macs in shape. Feel free to submit your own examples too, we'd love to get contributions.
|-Misc
|---DeviceRename
|---Dock
|---EnableOneDriveFinderSync
|---MDATP
|---Manage Accounts
|---Octory
|---Rosetta2
|---Wallpaper
|---checkPasswordPolicy
|---mdmDiagnose
|---setTimeZone
This section is for example Custom Attributes for deployment via Intune. These come from customer requirements and are stored here for the community.
|-Custom Attributes
|---CPU Architecture
|---Defender
|---Gimp
|---Hackintosh
This section is for example Custom Profiles for deployment via Intune. These come from various places, either hand written, Apple Condigurator 2 or OS X Server Manager's Profile Manager. Our aim is to have everything in here written into the Intune UI directly, but while we're working on that we're storing some useful profiles here.
|-Custom Profiles
|---Disable External Storage
|---Notifications
Understand the impact of each sample script prior to running it; samples should be run in a non-production or "test" environment.
This project welcomes contributions and suggestions. Most contributions require you to agree to aContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant usthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to providea CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructionsprovided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct.For more information see the Code of Conduct FAQ orcontact opencode@microsoft.com with any additional questions or comments.
==================================================================================== # Shell Program to Add Two Numbers clear echo "Enter first number: " read a echo "Enter second number: " r
海思压缩板带的SDK中的解压缩脚本 标签(空格分隔): 未分类 shell好久不写就忘记了语法,以后周期性的分析一些demo来熟悉一下,学习shell仅仅因为兴趣,运维方面没有接触过,所以很low,欢迎志同道合的一块学习,当然不会分析具体的一些命令 common.sh , 相当于定义好的函数库,在脚本中使用 source scripts/common.sh就可以使用这些函数,下面主要分析一些函数
简介 shell示例总结。 shell脚本示例 示例1:编写一个操作文件的脚本,如下所示: ***1.backup ** ***2.copy ** ***3.quit ** input a choice: 代码: #!/bin/bash cat<<eof ******************* ***1.backup ** ***2.copy ** ***3.quit ** ****
Shell 实践 Examples 只用来解决实际遇到的问题,不深究全部知识点 提取文件扩展名 echo ${file_name: -3} 获得当前文件夹的父文件夹路径 dirname $(pwd) 判断一个值是不是在一个 array 里面 arr=( hello world shell ) subele=wor subele1=world if [[ "${arr[@]}" == *"${sub
echo cat read tee 显示并保存 >:重定向标准输出 <:重定向标准输入 >>:附加 /dev/null declare -x:相当于 export,声明一个环境变量 declare +x:将环境变量编程自定义变量 使用diff和patch命令来做补丁 脚本的运行: ./ 在子shell中运行 source 在当前shell中运行 shell script的默认变量 $0: scr
找出所有含有elaborate.*-lm 的*.tcl 文件 find -name "*.tcl" -exec egrep -e "elaborate.*-lm" "{}" \; -print
shUnit2: https://github.com/kward/shunit2 用法非常简单,看看readme就行了。 转载于:https://www.cnblogs.com/taiyang-li/p/7967159.html
echo $0 来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7636787/viewspace-1844091/,如需转载,请注明出处,否则将追究法律责任。 转载于:http://blog.itpub.net/7636787/viewspace-1844091/
*显示当前shell #echo $SHELL *永久性修改用户的shell #chsh –s shell username 例如: # chsh –s /bin/bash Justin -l参数则列出所有的/etc/shells中的shell *临时修改shell #/bin/bash *返回上级Shell #exit[@more@] *历史记录 #history -option filenam
外加ConsoleOptionParser帮助从贝壳是一致和统一的方式完成的。通过使用———h选项您可以查看帮助或帮助任何核心壳,和任何shell ConsoleOptionParser实现: cake bake --help cake bake -h 都生成帮助烘烤。如果shell支持子命令你可以帮助那些以类似的方式: cake bake model --help cake bake model
Restriction Operators Where - Simple 1 This sample prints each element of an input integer array whose value is less than 5. The sample uses a query expression to create a new sequence of integers a
----------------query aggregation function and group by ------------------------- SELECT Test1.Test, avg(Test1.Id) As avg, SUM(Test1.Id) As SUm, COUNT(Test1.Id) As Count FROM [Test1] GROUP BY
The shell is a command interpreter. More than just the insulating layer between the operating system kernel and the user, it's also a fairly powerful programming language. A shell program, called a sc
Distinct - 1 This sample prints the prime factors of the number 300. The sample creates a sequence of unique factors by using the Distinct method on the integer array of factors to remove duplicates.
1) select var in keywords do ops done #!/bin/bash #select regards each item in keywords as form, and do ops interactiv ely echo "What is your favourite OS?" select var in "LINUX" "UNIX" "WINDOWS" "O
http://blog.csdn.net/david_xtd/article/details/7576666
OrderBy - Simple 1 This sample prints an alphabetically sorted version of an input string array. The sample uses orderby to perform the sort. publicvoid Linq28() { string[] words = { "cherry", "a
A login shell is the first process that executes under your user ID when you log in for an interactive session. The login process tells the shell to behave as a login shell with a convention: passing
1. shell文件执行方式(两种) sh test.sh #当test.sh没有可执行权限时,只能用这种方式 ./test.sh #推荐用这个命令,sh有时会报错 没有可执行权限时,可用如下命令: chmod u+x test.sh #给test.sh文件加可执行权限 ll #可查看文件有哪些权限 2. 判断目录是否存在 DATA=/home/liuwei/caffe #将路径保存在变量DAT
Shell排序是一种高效的排序算法,基于插入排序算法。 该算法避免了大的移位,如插入排序的情况,如果较小的值是最右边的并且必须移动到最左边。 该算法对广泛传播的元素使用插入排序,首先对它们进行排序,然后对间距较小的元素进行排序。 该间距称为interval 。 此间隔基于Knuth的公式计算为 - Knuth的公式 h = h * 3 + 1 where − h is interval wi
shell 模块提供了集成其他桌面客户端的关联功能. 在用户默认浏览器中打开URL的示例: var shell = require('shell'); shell.openExternal('https://github.com'); Methods shell 模块包含以下函数: shell.showItemInFolder(fullPath) fullPath String 打开文件所在文
使用默认应用程序管理文件和 url。 进程: Main, Renderer shell 模块提供与桌面集成相关的功能。 在用户的默认浏览器中打开 URL 的示例: const { shell } = require('electron') shell.openExternal('https://github.com') Manage files and URLs using their defau
Erlang shell用于测试表达式。 因此,在实际测试应用程序本身之前,可以非常轻松地在shell中进行测试。 以下示例展示了如何在shell中使用加法表达式。 这里需要注意的是表达式需要以点(。)分隔符结束。 执行命令后,shell会打印另一个提示符,这次是命令编号2(因为每次输入新命令时命令编号都会增加)。 以下函数是Erlang shell中最常用的函数。 b() - 打印当前变量绑定。
可能您早已能够熟练的使用 GUI(图形用户界面),例如您可以使用鼠标双击一个图标,来打开或者执行它。 我们来看这个过程: 您使用鼠标定位桌面上的一个程序图标,按下左键两次。系统读取鼠标指针的位置,并且判断该位置下图标的涵义,根据预设的双击动作,运行程序或者打开文件。 这一套 GUI 系统,便是一种 Shell,它的作用是实现人机交互。如果我们不能够控制电脑,那么电脑还不如电视机好玩,不是么?电视机
使用默认应用程序管理文件和 url。 Process: Main, Renderer (只能在非沙盒下使用) shell 模块提供与桌面集成相关的功能。 在用户的默认浏览器中打开 URL 的示例: const { shell } = require('electron') shell.openExternal('https://github.com') 注意: 虽然 shell 模块可以在渲染