Advertisement
Cogger

Office-Collection.ps1

May 26th, 2022
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. $currentArray = (Get-Package -ProviderName Programs -Name "Microsoft*" -AllVersions).Name
  3.  
  4.  
  5.     $ignoreArray= @(
  6.  
  7.     # Software that we will ignore
  8.     "Microsoft OneDrive"
  9.     "Microsoft Teams"
  10.     "Microsoft Edge"
  11.     "Microsoft Edge Update"
  12.     "Microsoft Edge WebView2 Runtime"
  13.     "Microsoft Visual C++ 2015-2022 Redistributable (x86) - 14.30.30708"
  14.     "Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.30.30708"
  15.     "Microsoft Teams"
  16.     )
  17.  
  18.  
  19. $App_Array = $currentArray |Where-Object { $ignoreArray -notcontains $_ }
  20. $App_Array | clip
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement