- Citrix Technology Professional with a flair for automation.
- From Nettetal in Germany.
microsoft's Introduction
microsoft's People
Forkers
prophilly jimmoyle wutang-financial mechamonk zivcohenoz tcustan golubenkoff ravager-dk kiritzai joyd86 chatru-vs mohamedgdz sebastianflint mapetnik dererny briggsmbj miked1313 manu118 adeelaleem rkoded cszheng1 babylife tmearns3 th3nme andreaswsit css-smuellermicrosoft's Issues
Last modified Date: 05-05-2022
Hi,
That must probably be 05-05-2021 instead of 2022
Rgds Johan
Roaming Profile issue - no consideration to the default roaming profile naming convention
While attempting to use this recently i ran into the blocker that i was unable to process the directory that housed my Roaming Profiles as they were all named "username.DOMAIN.V6". The script failed, being unable to find a username. Would some sanity check on the username be possible on this?
Wrong string marks used
Hi,
please check your scripts for wrong string marks and fix them:
- Only -->'<-- should be used.
- Other like -->`<-- or -->´<-- will get bad transformed in Windows UTF8, which is used in Windows PowerShell.
For example Microsoft-InstalledSoftware.ps1 has wrong ones which results in these errors, if I try to execute it on a Windows machine:
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:368 char:61
+ $reg = [microsoft.win32.registrykey]::OpenRemoteBaseKey( ‘Local ...
+ ~
Missing ')' in method call.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:368 char:62
+ ... oft.win32.registrykey]::OpenRemoteBaseKey( ‘LocalMachine’ , $comp ...
+ ~~~~~~~~~~~~~~~~~~
Unexpected token '‘LocalMachine’' in expression or statement.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:368 char:81
+ ... t.win32.registrykey]::OpenRemoteBaseKey( ‘LocalMachine’ , $comput ...
+ ~
Missing argument in parameter list.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:349 char:1
+ {
+ ~
Missing closing '}' in statement block or type definition.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:380 char:61
+ $reg = [microsoft.win32.registrykey]::OpenRemoteBaseKey( ‘Users ...
+ ~
Missing ')' in method call.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:380 char:62
+ ... [microsoft.win32.registrykey]::OpenRemoteBaseKey( ‘Users’ , $comp ...
+ ~~~~~~~~~~~
Unexpected token '‘Users’' in expression or statement.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:380 char:74
+ ... icrosoft.win32.registrykey]::OpenRemoteBaseKey( ‘Users’ , $comput ...
+ ~
Missing argument in parameter list.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:380 char:90
+ ... .win32.registrykey]::OpenRemoteBaseKey( ‘Users’ , $computername )
+ ~
Unexpected token ')' in expression or statement.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:407 char:1
+ } ) | Sort -Property ComputerName, DisplayName
+ ~
Unexpected token '}' in expression or statement.
At ..\Microsoft-master\Windows\Microsoft-InstalledSoftware.ps1:407 char:3
+ } ) | Sort -Property ComputerName, DisplayName
+ ~
Unexpected token ')' in expression or statement.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingEndParenthesisInMethodCall
Thanks.
Missing lines from original Version
I tried this version https://github.com/Deyda/Microsoft/blob/master/FSLogix/FSLogix-ShrinkDisk.ps1
but I'm getting errors and disk's stay mounted after error.
can you import missing lines from https://github.com/FSLogix/Invoke-FslShrinkDisk/blob/master/Invoke-FslShrinkDisk.ps1
Teams Settings
I Have update the Script as follows:
- Powershell Transcript added
- Directory $ENV:APPDATA\Microsoft\Teams will be created if not exists
- destkop-config.json is created with default values if not exists
- Code improvements
<#
.SYNOPSIS
This script allows you to define the Teams settings per user
.DESCRIPTION
Define the Teams settings.
.NOTES
Version: 1.2
Original Author: D. Mohrmann, S&L Firmengruppe, Twitter: @mohrpheus7
Rewrite Author: Manuel Winkel <www.deyda.net>
Creation Date: 2020-11-30
Purpose/Change: Added more Teams settings
31.05.2021 Matthias Schlimm/EUCweb: test if desktop-config.json exists and create it with default values or updating the existing one. Added Powershell Transcript
.EXAMPLE
WEM:
Path: powershell.exe
Arguments: -executionpolicy bypass -file Teams-UserSettings.ps1"
#>
#Define settings
param(
#Enable or disable GPU acceleration
[boolean]$disableGpu=$True,
#Fully close Teams App
[boolean]$runningOnClose=$true,
#Auto-start application
[boolean]$openAtLogin=$False,
#Register Teams as the default chat app for office
[boolean]$registerAsIMProvider=$False,
#Open Teams hidden
[boolean]$openAsHidden=$true
)
$ConfigFile = "$ENV:APPDATA\Microsoft\Teams\desktop-config.json"
start-transcript $env:appdata\Set-Teams-UserSettings.log
Write-Host "--- Teams Settings --- "
Write-Host "disableGpu=$disableGpu"
Write-Host "runningOnClose=$runningOnClose"
Write-Host "openAtLogin=$openAtLogin"
Write-Host "registerAsIMProvider=$registerAsIMProvider"
Write-Host "openAsHidden=$openAsHidden"
#Read Teams Configuration from desktop-config.json
IF (Test-path $ConfigFile ) {
Write-Host "Get Content from File $ConfigFile"
#Convert file to PowerShell object from desktop-config.json
$JSONObject=Convertfrom-Json -inputobject (Get-Content $ConfigFile -Raw)
Write-Host "Update Teams Settings"
#Update settings from desktop-config.json
$JSONObject.appPreferenceSettings.disableGpu=$disableGpu
$JSONObject.appPreferenceSettings.runningOnClose=$runningOnClose
$JSONObject.appPreferenceSettings.openAtLogin=$openAtLogin
$JSONObject.appPreferenceSettings.registerAsIMProvider=$registerAsIMProvider
$JSONObject.appPreferenceSettings.openAsHidden=$openAsHidden
#Rewrite configuration to file from desktop-config.json
$NewFileContent=$JSONObject | ConvertTo-Json | Set-Content -Path $ConfigFile
} Else {
$TeamsPath = [System.IO.Path]::GetDirectoryName($ConfigFile)
IF (!(Test-Path $TeamsPath)) {
Write-Host "Path $TeamsPath doesn't exist, creating Directory"
New-Item -ItemType Directory -Path $TeamsPath
}
Write-Host "File $ConfigFile doesn't exist, creating it with default settings"
$jsonBase = @{}
$JsonDefaultData = @{}
$JsonDefaultData = @{
"disableGpu"=$disableGpu;
"runningOnClose"=$runningOnClose;
"openAtLogin"=$openAtLogin;
"registerAsIMProvider"=$registerAsIMProvider;
"openAsHidden"=$openAsHidden;
}
$jsonBase.Add("appPreferenceSettings",$JsonDefaultData)
$jsonBase.Add("theme","Default")
$jsonBase | ConvertTo-Json -Depth 10 | Out-File $ConfigFile -encoding ASCII
}
Stop-Transcript
Expand fail
Hi, i try this script to expand some vhdx O365 disk but i have this error and half work is doing :
TerminatingError(Get-Partition): "Cannot validate argument on parameter 'DiskNumber'. The argument is null. Provide a valid value for the argument, and then try running the command again."
TerminatingError(Get-Partition): "Cannot validate argument on parameter 'DiskNumber'. The argument is null. Provide a valid value for the argument, and then try running the command again."
Cannot validate argument on parameter 'DiskNumber'. The argument is null. Provide a valid value for the argument, and then try running the command again.[0].Exception.GetType().FullName
My vhdx mounted with add 10Gb but no expand done
AppxPackage - developer license
Hi,
when I am doing the second phase - register, I will always get following error
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CFF, K instalaci této aplikace potřebujete vývojářskou licenci pro Windows nebo systém s povoleným zkušebním nač
ítáním aplikací (sideload).
Deployment of package Firefox_1.0.0.0_x64__zgke8crrmjz2e with package origin Unsigned failed because no valid license or sideloading policy could be applied. A developer
license (http://go.microsoft.com/fwlink/?LinkId=233074) or enterprise sideloading configuration (http://go.microsoft.com/fwlink/?LinkId=231020) may be required.
NOTE: For additional information, look for [ActivityId] e03c0518-0c46-0001-cc59-3fe0460cd801 in the Event Log or use the command line Get-AppPackageLog -ActivityID e03c0
518-0c46-0001-cc59-3fe0460cd801
I enabled developer mode and enabled running applications from all locations, but without any effect
Thank you
Add functionality for multiple servers - FSLogix CCD
Is there a way to get this script to work across multiple servers ?
We use FSLogix CCD so we have a couple of server that host the profile disks. It would be good if the script could process the user disks at both locations at the same time so there are no discrepancies by doing one server at a time.
Both sites have the same directory layout and naming convention so it would be quite simple for the script to do both at the same time without having to run two different processes.
Thanks
issue with vhdx if not created with frx.exe
if the vhdx files are created from the native operating system instead of of the frx.exe, I got issues to shrink the vhdx afterwards with the script from Jim Moyle, check out FSLogix/Invoke-FslShrinkDisk#22
Have to run script twice to shrink VHD
I have noticed that trying to compress some disks they are not compressing to what I expected them to. I have tested this a few times and get the same issue.
Example:
User had a 20GB VHD
Ran your script once gave this output :
Post Defragmentation Report:
VERBOSE:
Volume Information:
VERBOSE: Volume size = 29.29 GB
VERBOSE: Cluster size = 4 KB
VERBOSE: Used space = 2.18 GB
VERBOSE: Free space = 27.10 GB
VERBOSE:
Allocation Units:
VERBOSE: Slab count = 936
VERBOSE: Slab size = 32 MB
VERBOSE: Slab alignment = 31.00 MB
VERBOSE: In-use slabs = 73
VERBOSE:
Slab Consolidation:
VERBOSE: Space efficiency = 100%
VERBOSE: Potential purgable slabs = 430
VERBOSE: Slabs pinned unmovable = 6
VERBOSE: Successfully purged slabs = 423
VERBOSE: Recovered space = 13.21 GB
VERBOSE:
Retrim:
VERBOSE: Backed allocations = 618
VERBOSE: Allocations trimmed = 545
VERBOSE: Total space trimmed = 17.03 GB
but looking at the VHD it was only dropped back to 11GB.
I ran the script again and it dropped the VHD down to 2GB with this output :
Post Defragmentation Report:
VERBOSE:
Volume Information:
VERBOSE: Volume size = 29.29 GB
VERBOSE: Cluster size = 4 KB
VERBOSE: Used space = 2.18 GB
VERBOSE: Free space = 27.10 GB
VERBOSE:
Allocation Units:
VERBOSE: Slab count = 936
VERBOSE: Slab size = 32 MB
VERBOSE: Slab alignment = 31.00 MB
VERBOSE: In-use slabs = 73
VERBOSE:
Slab Consolidation:
VERBOSE: Space efficiency = 100%
VERBOSE: Potential purgable slabs = 0
VERBOSE: Slabs pinned unmovable = 6
VERBOSE: Successfully purged slabs = 0
VERBOSE: Recovered space = 0 bytes
VERBOSE:
Retrim:
VERBOSE: Backed allocations = 73
VERBOSE: Allocations trimmed = 0
VERBOSE: Total space trimmed = 0 bytes
Is this expected behaviour ? Do I have to run the script twice for it to finally truncate the VHD to the correct size ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.