Skip to content

Commit 37b8b4e

Browse files
author
haraldpfirmann
committed
Fixes
1 parent fe6ff34 commit 37b8b4e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

ActiveDirectory/Users/Set-ADUserStatus.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ try{
117117
'AuthType' = $AuthType
118118
'Identity' = $Script:User
119119
}
120+
if($null -ne $DomainAccount){
121+
$cmdArgs.Add("Credential", $DomainAccount)
122+
}
120123
if($UnLock -eq $true){
121124
if($Script:User.LockedOut -eq $true){
122125
Unlock-ADAccount @cmdArgs

VMware/VMs/Register-VMHVVirtualMachine.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ try{
116116

117117
if($PSCmdlet.ParameterSetName -eq "onCluster"){
118118
$Script:store = Get-Cluster -Server $Script:vmServer -Name $ClusterName -ErrorAction Stop
119+
$cmdArgs['Name'] = $NameOfVM
119120
$cmdArgs.Add('ResourcePool', $Script:store)
120121
}
121122
if([System.String]::IsNullOrEmpty($Location) -eq $false){

WinPrintManagement/Printers/Set-PrtMPrinter.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ try{
9292
else {
9393
$Script:Cim =New-CimSession -ComputerName $ComputerName -Credential $AccessAccount -ErrorAction Stop
9494
}
95-
$prn=Get-Printer -CimSession $Script:Cim -Name $PrinterName -ComputerName $ComputerName -ErrorAction SilentlyContinue
95+
$prn = Get-Printer -CimSession $Script:Cim -Name $PrinterName -ComputerName $ComputerName -ErrorAction SilentlyContinue
9696
if($null -eq $prn){
9797
$Script:Output += "Printer $($PrinterName) not found"
9898
}
@@ -109,7 +109,7 @@ try{
109109
Set-Printer @cmdArgs -Shared -ShareName $ShareName
110110
}
111111
if($PSBoundParameters.ContainsKey('PrintProcessor') -eq $true){
112-
Set-Printer -PrintProcessor $PrintProcessor
112+
Set-Printer -PrintProcessor $PrintProcessor
113113
}
114114
if($PSBoundParameters.ContainsKey('Comment') -eq $true){
115115
Set-Printer @cmdArgs -Comment $Comment

0 commit comments

Comments
 (0)