Last active
May 7, 2019 16:18
-
-
Save yesoreyeram/861a0cece37c71ff3130543d318d08d8 to your computer and use it in GitHub Desktop.
DSC Installtion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# $1 - DSC ServerURL | |
# $2 - DSC RegistrationKey | |
# $3 - DSC ConfigurationName | |
mkdir -p /opt/downloads; | |
# https://github.com/microsoft/PowerShell-DSC-for-Linux/issues/432 | |
mount -o remount,exec /tmp; | |
cd /opt/downloads; | |
if [ ! -f /opt/downloads/omi-1.1.0.ssl_100.x64.rpm ]; then | |
wget https://github.com/Microsoft/omi/releases/download/v1.1.0-0/omi-1.1.0.ssl_100.x64.rpm | |
fi | |
if [ ! -f /opt/downloads/dsc-1.1.1-294.ssl_100.x64.rpm ]; then | |
wget https://github.com/Microsoft/PowerShell-DSC-for-Linux/releases/download/v1.1.1-294/dsc-1.1.1-294.ssl_100.x64.rpm | |
fi | |
rpm -Uvh /opt/downloads/omi-1.1.0.ssl_100.x64.rpm /opt/downloads/dsc-1.1.1-294.ssl_100.x64.rpm | |
/opt/microsoft/dsc/Scripts/Register.py --ServerURL $1 --RegistrationKey $2 --ConfigurationName $3 | |
exit 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# $1 - DSC ServerURL | |
# $2 - DSC RegistrationKey | |
# $3 - DSC ConfigurationName | |
apt-get update -y; | |
mkdir -p /opt/downloads; | |
# https://github.com/microsoft/PowerShell-DSC-for-Linux/issues/432 | |
mount -o remount,exec /tmp; | |
cd /opt/downloads; | |
if [ ! -f /opt/downloads/omi-1.1.0.ssl_100.x64.deb ]; then | |
wget https://github.com/Microsoft/omi/releases/download/v1.1.0-0/omi-1.1.0.ssl_100.x64.deb | |
fi | |
if [ ! -f /opt/downloads/dsc-1.1.1-294.ssl_100.x64.deb ]; then | |
wget https://github.com/Microsoft/PowerShell-DSC-for-Linux/releases/download/v1.1.1-294/dsc-1.1.1-294.ssl_100.x64.deb | |
fi | |
dpkg -i /opt/downloads/omi-1.1.0.ssl_100.x64.deb /opt/downloads/dsc-1.1.1-294.ssl_100.x64.deb | |
/opt/microsoft/dsc/Scripts/Register.py --ServerURL $1 --RegistrationKey $2 --ConfigurationName $3 | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment