Microsoft Intune Deployment (Microsoft Intune 배포)

AIT는 MSI 형식으로 배포한 다음 PowerShell을 사용하여 실행할 수 있습니다.

1단계

으로 이동하여 Windows apps(Windows 앱)Add(추가)를 선택합니다.

2단계

Line-of-business app(업무용 앱)을 선택합니다.

3단계

Select package app file(패키지 앱 파일 선택)을 클릭하고 AIT.msi를 선택합니다.

이 파일은 여기에서 다운로드할 수 있습니다.

4단계

이름을 Autodesk Inventory Tool(게시자인 경우에는 Autodesk)로 지정하고 Next(다음)를 클릭합니다.

5단계

스캔할 장치에 장치 사용자 또는 그룹을 추가합니다.

6단계

앱을 생성하는 데 시간이 좀 걸리며, 배포가 완료되어야 다음 단계를 수행할 수 있습니다.

AIT가 엔드포인트에 배포되면 이제 2가지 옵션을 사용할 수 있습니다.

실행 정책을 설정하기 위해 추가로 고려해야 할 사항이 있을 수 있습니다. 

옵션 1 - 이메일로 결과 보내기

사용자가 VPN에 연결하지 않습니다.

다음 PowerShell 스크립트를 사용하면 AIT가 실행된 후 지정된 이메일로 결과가 전송됩니다.

이 스크립트는 사용자로 실행해야 합니다.

$aitpath="C:\program files (x86)\Autodesk\Autodesk Inventory Tool\AIT.exe"
$computername= $env:computername
Start-Process -FilePath $aitpath -ArgumentList "/c $computername /fp /lu /rp /sl" -WindowStyle Hidden
Start-Sleep 80
rename-item -Path "C:\ProgramData\Autodesk\AIT\DataStore.xml" -NewName "C:\ProgramData\Autodesk\AIT\$computername.xml"

cd "C:\ProgramData\Autodesk\AIT"
$OL = New-Object -ComObject outlook.application
$name = hostname
$loc = (Get-Location).Path
$result = "$loc\$name.xml"

Start-Sleep 5

$mItem = $OL.CreateItem("olMailItem")
#change "ENTERYOUREMAIL@autodesk.com" to any preferred email address
$mItem.To = "ENTERYOUREMAIL@autodesk.com"    
$mItem.Subject = "AIT Scan Results"
$mItem.Body = "Results from $name"
$mItem.Attachments.Add($result)
$mItem.Send()
Exit(0) 
Click to copy

데이터를 수집하려면 받은 편지함 아래에 "AIT Results"라는 폴더를 만들고 제목이 "AIT Scan Results"인 모든 이메일을 이동하는 규칙을 만듭니다.


다음 PowerShell 스크립트를 실행하여 폴더에 첨부 파일의 압축을 풉니다.

 # link to the folder
 # replace "youremail@company.com" to your email address
 $olFolderPath = "\\youremail@company.com\Inbox\Personal"

 # set the location to temporary file
 $filePath = "C:\test\"

 # use MAPI name space
 $outlook = new-object -com outlook.application; 
 $mapi = $outlook.GetNameSpace("MAPI");
 $olDefaultFolderInbox = 6
 $inbox = $mapi.GetDefaultFolder($olDefaultFolderInbox) 
 $olTargetFolder = $inbox.Folders | Where-Object { $_.FolderPath -eq $olFolderPath }
 $emails = $olTargetFolder.Items

 # process the emails
 foreach ($email in $emails) {
 $email.Attachments | foreach {
 $fileName = $_.FileName
 $_.saveasfile((Join-Path $filePath $fileName)) 
 } 
 }  
Click to copy

옵션 2 - SMB 공유

사용자가 VPN을 통해 중앙의 서버에 액세스합니다.

다음 스크립트를 사용하면 구성 파일이 지정된 경로로 수정된 다음 AIT가 실행됩니다.

$filePath = "C:\Program Files (x86)\Autodesk\Autodesk Inventory Tool\AIT.exe.config"
$DataStorePath = '<value>Default</value>'
$UNCPATH = '<value>\\DC01\AIT\DATA\</value>'
$PerComputerDataStore = '<value>False</value>'
$SetToTrue = '<value>True</value>'
$aitPath = "C:\Program Files (x86)\Autodesk\Autodesk Inventory Tool\AIT.exe"
if (Test-Path $filePath) 
        {
        (Get-Content $filePath) |        
            Foreach-Object { $_ -replace $DataStorePath, $UNCPATH } |        
            Foreach-Object { $_ -replace $PerComputerDataStore, $SetToTrue } |        
            Set-Content $filePath
        }
Start-Sleep 20
Start-Process -FilePath $aitPath -ArgumentList "/c localhost /fp /lu /rp /sl" -WindowStyle Hidden
Click to copy