• 5 changes coming to PowerShell 7.0 - TechRepublic
    PowerShell is undergoing an upgrade to version 7.0 across all lines, bringing parity with the Windows version for all OSes, new features, and enhanced security.
  • Releasing Windows 10 Insider Preview Build 19025 into the Slow ring | Windows Experience Blog
    Hello Windows Insiders, today were releasing Windows 10 Insider PreviewBuild 19025.1051 (20H1)to Windows Insiders in the Slow ring. For details on what is included in this build and known issues,see this blog post. For a summary of all the new 20H1 features,see this article on Microsoft Docs.
  • @Todd M,

    I know this is old but to do what you're looking for, use PSLoggedOn.exe from SysInternals (a Microsoft Tool).

    running the command,

    psloggedon PCName

    will return something like:

    PsLoggedon v1.35 - See who's logged on

    Copyright (C) 2000-2016 Mark Russinovich
    Sysinternals - http://www.sysinternals.com

    Users logged on locally:
         11/20/2019 2:50:27 PM      domainusername

    Users logged on via resource shares:
         11/20/2019 4:09:13 PM      domainyourownusername

  • Hi Ruben,

    Great article and very helpful. I have just one question though. I just noticed one of the groups in not showing all of the user objects. In group there are about 150 users and Excel data is showing 130. Is there a way to re-sync or force to get all of the users.

    Would really appreciate for your help.

  • Ger became a registered member 8 hours, 16 minutes ago

  • I'm making some radical updates to this project 'Hybrid - Desired State Controller', wanted to showcase this GUI/networking module that will integrate the MDT/Image Factory/PSD Master project in addition to automating the configuration of IIS, DNS, DHCP, and Certificate based services.

    It's still a long way from being complete, however, you can scope out the tool I made for Active Directory Domain Controller Promotion ( DCPromo ).

    Project is located here.

    This is as PowerShell based/focused as it is a System Administration and Network Security Engineering. (putting my old school MCSE stuff to the test...)

    Will have my website relaunched soon, probably with Blazor. If you haven't heard of Blazor... well, it's sort of like if a ninja had a baby with a viking. Takes 2 cool things like ASP.Net and Razor/WebAssembly, and makes it possible to do C# instead of Javascript. And... I think it's cool cause I don't like JS.

    - MC

  • Thanks for the reply. I'm reading of folks unable to do the in-place upgrade. And I've seen multiple examples of that, where they tried to do it, and it did not give them the option. Since I'm on, effectively, a trial copy of 2012R2, I think I fall into that category, where it will not allow me to upgrade from eval to eval.

    The quote I get on one response was: You cannot in-place upgrade to a higher version of windows in any of these scenarios from licensed to evaluation, evaluation to licensed, evaluation to evaluation. That makes a kind of sense.

    Again, thanks for the response. Time to reboot my mind and take a different approach.

  • Good question, simply download an eval from Microsoft, and then apply the license number you've got when you bought the product.

  • Jim Wilson became a registered member 18 hours, 46 minutes ago

  • So if I want to do an in-place upgrade from 2012R2 to 2019, how do I download a copy of 2019 that does that? When I buy the 2019 license 16core, will that include the software or a link to download it?

  • Guys does someone know why a module (PM1) works in ISE but not in the PS Console.

    Its a little script what I wrote to logon on 365 what write the credentials in the registry.

    Don't get error messages.

    Strange thing is that the same script works within the console when I save it as PS1.

    So not working as PM1 but as PS1 no problem. 

  • I use the following code to install Fonts on remote PCs, no need to logoff or reboot. Tested on 1909.

    #Computers to install fonts to
    $ComputerArray = @("Pc1","Pc2","Pc3")
    #A Share containing only the fonts you want to install
    #Wil be created on remote Pc if not exists, fonts will be copied here and deleted after install.
    foreach ($pc in $ComputerArray) {
    If((Test-Connection -ComputerName  $pc -Count  1 -ErrorAction SilentlyContinue) -and ($Winrmstatus=Test-WSMan -ComputerName $pc -ErrorAction SilentlyContinue)) {
    $RemotePcStagingDir = "$pc$($PcStagingDir.replace(':','$'))"
    $ServiceName = @("WinRM")
    foreach ($svc in $ServiceName) {
            while(((Get-Service -ComputerName $pc -Name $svc -ErrorAction SilentlyContinue).status -ne "Running")-and($i -lt 10)){
                if((Get-Service -ComputerName $pc -Name $svc -ErrorAction SilentlyContinue).StartType -eq "Disabled"){
                Write-Host "Try $i , Setting service $svc StartType to Manual on $pc ..."
                Set-Service -ComputerName $pc -Name $svc -StartupType Manual -ErrorAction SilentlyContinue}
            Write-Host "Try $i / 10 , Starting $svc Service on $pc ..."
            $commandz="sc "+$pc +" Start "+$svc
            & cmd.exe /c $commandz | Out-Null
            sleep 3}
            if($i -ge 10){break}
    if($i -ge 10){Write-Host "Could NOT start service $svc, Skipping Computer $pc" -ForegroundColor Red}else{
    if ( -not (Test-Path -Path $RemotePcStagingDir)){New-Item -Path $RemotePcStagingDir -ItemType Directory -Force}
    $RemoteWinDir=Invoke-Command -ComputerName $pc -ScriptBlock {return $env:windir}
    foreach($FontFile in (Get-ChildItem -file -path $FontDir)){
        if(-not(Test-Path "$pc$($RemoteWinDir.replace(':','$'))Fonts$FontFile")){
            Copy-Item "$FontDir$FontFile" -Destination $RemotePcStagingDir -Force
            Invoke-Command -ComputerName $pc -ScriptBlock {
           $fontRegistryPath = "HKLM:SOFTWAREMicrosoftWindows NTCurrentVersionFonts"
           $fontsFolderPath = "$($env:windir)fonts"
        # Create hashtable containing valid font file extensions and text to append to Registry entry name.
        $hashFontFileTypes = @{}
        $hashFontFileTypes.Add(".fon", "")
        $hashFontFileTypes.Add(".fnt", "")
        $hashFontFileTypes.Add(".ttf", " (TrueType)")
        $hashFontFileTypes.Add(".ttc", " (TrueType)")
        $hashFontFileTypes.Add(".otf", " (OpenType)")
            [string]$filePath = (Get-Item $filePath).FullName
            [string]$fileDir  = split-path $filePath
            [string]$fileName = split-path $filePath -leaf
            [string]$fileExt = (Get-Item $filePath).extension
            [string]$fileBaseName = $fileName -replace($fileExt ,"")
            $shell = new-object -com shell.application
            $myFolder = $shell.Namespace($fileDir)
            $fileobj = $myFolder.Items().Item($fileName)
            $fontName = $myFolder.GetDetailsOf($fileobj,21)
            if ($fontName -eq "") { $fontName = $fileBaseName }
            copy-item $filePath -destination $fontsFolderPath
            $fontFinalPath = Join-Path $fontsFolderPath $fileName
            if (-not($hashFontFileTypes.ContainsKey($fileExt))){Write-Host "File Extension Unsupported";$retVal = 0}
            if ($retVal -eq 0) {
                Write-Host "Font `'$($filePath)`'`' installation failed on $env:computername" -ForegroundColor Red
                Write-Host ""
                Set-ItemProperty -path "$($fontRegistryPath)" -name "$($fontName)$($hashFontFileTypes.$fileExt)" -value "$($fileName)" -type STRING
                Write-Host "Font `'$($filePath)`' $fontName $($hashFontFileTypes.$fileExt) installed successfully on $env:computername" -ForegroundColor Green
            Write-Host "An error occured installing `'$($filePath)`' on $env:computername" -ForegroundColor Red
            Write-Host "$($error[0].ToString())" -ForegroundColor Red
         Remove-Item "$RemotePcStagingDir$FontFile" -ErrorAction SilentlyContinue
    foreach($DisabledSvc in $DisabledSvcs){
        Write-Host "Setting service $DisabledSvc StartType to Disabled on $pc ..."
        Set-Service -ComputerName $pc -Name $DisabledSvc -StartupType Disabled -ErrorAction SilentlyContinue
        $commandz="sc "+$pc +" Stop "+$DisabledSvc
        & cmd.exe /c $commandz | Out-Null
    }else{if($Winrmstatus){Write-Host "No Connection to Remote Pc $pc" -ForegroundColor Red}Else{Write-Host "No Connection to WinRM service on Remote Pc $pc" -ForegroundColor Red}}
  • here is an example for creating custom role

    $role = [Microsoft.Azure.Commands.Resources.Models.Authorization.PSRoleDefinition]::new()$role.Name = 'custom access role'$role.Description = 'custom role.'$role.IsCustom = $true$perms = 'Microsoft.Network/networkInterfaces/read','Microsoft.Compute/virtualMachines/read'$role.Actions = $perms$subs = '/subscriptions/hjhjhjhjhjhjhjhjh'$role.AssignableScopes = $subsNew-AzRoleDefinition -Role $role

  • From the last few days it takes more time than usual.

  • Since when do you experience this problem?

  • Just to inform that there is a really long delay when I click the Add News link.
    In certain case I don't have any page refresh and clicking again cause a double post.

  • Announcing Windows 10 Insider Preview Build 19028 | Windows Experience Blog
    Hello Windows Insiders, today were releasing Windows 10 Insider Preview Build 19028 (20H1) to Windows Insiders in the Fast ring. If you want a complete look at what build is in which Insider ring, head over to Flight Hub.
  • .NET Framework November 2019 Preview of Quality Rollup | .NET Blog
    Today, we are releasing the November 2019 Preview of Quality RollupQuality and ReliabilityThis release contains the following quality and reliability improvements for .NET Framework for Windows 8.1, Server 2012 R2, Server 2012, Windows 7 SP1, Server 2008 R2 SP1 and Server 2008 SP2.
  • Load More
© 4sysops 2006 - 2019


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account