Featured

Adding and Removing Shortcuts on User Desktop through Intune

With the help of powershell script we have Created and Removed shortcuts on user Desktop through intune for the following applications.

Here are the steps how to deploy poweshell scripts through Intune:

Go to Azure management portal then go to Intune > Device Configuration > Scripts then add the scripts.

Adding of chrome Shortcut:

$SourceFileLocation = “${Env:ProgramFiles(x86)}\Google\Chrome\Application\chrome.exe”

$ShortcutLocation = “$env:USERPROFILE\Desktop\chrome.lnk”

$WScriptShell = New-Object -ComObject WScript.Shell

$Shortcut = $WScriptShell.CreateShortcut($ShortcutLocation)

$Shortcut.TargetPath = $SourceFileLocation

$Shortcut.Save()

Adding of Teams Shortcut:

$SourceFileLocation = “$env:USERPROFILE\AppData\Local\Microsoft\teams\current\teams.exe”

$ShortcutLocation = “$env:USERPROFILE\Desktop\teams.lnk”

$WScriptShell = New-Object -ComObject WScript.Shell

$Shortcut = $WScriptShell.CreateShortcut($ShortcutLocation)

$Shortcut.TargetPath = $SourceFileLocation

$Shortcut.Save()

Adding of Edge Shortcut:

$SourceFileLocation = “${Env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe”

$ShortcutLocation = “$env:USERPROFILE\Desktop\edge.lnk”

$WScriptShell = New-Object -ComObject WScript.Shell

$Shortcut = $WScriptShell.CreateShortcut($ShortcutLocation)

$Shortcut.TargetPath = $SourceFileLocation

$Shortcut.Save()

Adding of Outlook shortcut :

$SourceFileLocation = “$($env:ProgramW6432)\Microsoft Office\root\Office16\OUTLOOK.EXE”

$ShortcutLocation = “$env:USERPROFILE\Desktop\outlooknew.lnk”

$WScriptShell = New-Object -ComObject WScript.Shell

$Shortcut = $WScriptShell.CreateShortcut($ShortcutLocation)

$Shortcut.TargetPath = $SourceFileLocation

$Shortcut.Save()

Removing of Shortcuts from users desktop:

  1. $Path = “$env:USERPROFILE\Desktop\shortcut Lenovo.lnk”

              Remove-Item $Path

  • $Path = “$env:USERPROFILE\Desktop\shortcut Windows Mail.lnk”

              Remove-Item $Path

  • $Path = “$env:USERPROFILE\Desktop\shortcut Windows Store.lnk”

              Remove-Item $Path

Office 365 Updates

New Feature: Discover Office files in Outlook for iOS :

They are adding intelligent technology to the Search experience in Outlook for iOS by introducing a new Discover capability, powered by Microsoft Graph. Discover provides a feed of your company’s Office files connected to the people in your organization.

By tapping the Search icon in Outlook for iOS, you will see a new area called Discover. This feed uses machine learning to provide quick access to Office 365 documents that are popular among people close to you in your organization.

New Feature: Send feedback to Microsoft Teams :

User will have an option to send feedback to Microsoft. The new feature will be available under Help > “Give feedback”

Now we can suggest for any problem with teams we can send those issues to the teams.

New Feature: Teams @-less mention:

Now users can actually see the auto-suggested list of people, then they can select the person easily.

Create a list in SPSite and Updating list using powershell

$inputsite = "https://SiteUrl"
$list = "OneDriveUrl"
$tenantAdminsite = "https://Tenant-admin.sharepoint.com"
$username = "User@Tenant.onmicrosoft.com"
$password = ConvertTo-SecureString "Password" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password)

$tenant = Connect-Site  -url $tenantAdminsite -Credential $cred
$site = Connect-PnPOnline -Url $inputsite -Credentials $cred

$listitems = (Get-PnPListItem -List $list -Fields "Title","Status","ID").FieldValues

foreach($item in $listitems)
{
    $email = $item["Title"]
    $status = $item["Status"]
    $ID = $item["ID"]

    if($status -eq "Ready")
    {
    $odurl = Get-OneDriveUrl -Email $email -Tenant $tenant -ProvisionIfRequired
    Set-PnPListItem -List $list -Identity $ID -Values @{"Status" = "Completed";"OD_x0020_url" = $odurl}
    }


}

Creating AZUREVM Using Powershell

$passwd = ConvertTo-SecureString "Password" -AsPlainText -Force

$username = "Tenant ID"

$cred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $passwd)

$connect = Connect-AzureAccount  -Credential $cred -TenantId "ecfe8182-3217-4e0b-9fb1-f8ad05aaca36" 

New-AzVm -ResourceGroupName "myResourceGroup" -Name "myVM" `
    -Location "EastUS" `
    -VirtualNetworkName "myVnet" `
    -SubnetName "mySubnet" `
    -SecurityGroupName "myNetworkSecurityGroup" `
    -PublicIpAddressName "myPublicIpAddress" `
    -OpenPorts 80,3389 `
    -size "Standard_D4s_v3"

Stop-AzVM `
   -ResourceGroupName "myResourceGroup" `
   -Name "myVM" -Force

Start-AzVM `
   -ResourceGroupName "myResourceGroup" `
   -Name "myVM"

Remove-AzVM `
   -ResourceGroupName "myResourceGroup" `
   -Name "myVM"

We can “Stop” the VM.

We can “Start” the VM.

We can also “Remove” the VM.

Design a site like this with WordPress.com
Get started