Questions tagged [powershell-v5.0]

58 questions
1
vote
0 answers

MD5 hash comparison over SMB SLOW

I'm scripting a full backup solution in powershell on Windows server 2016 for Hyper-V VM's and have run into the issue that calculating the MD5 hash over the network on a mounted network drive across a WAN is about half the speed of just doing the…
Brad
  • 250
  • 1
  • 11
1
vote
1 answer

DSC not pulling config

my DSC node is not pulling the DSC config from my SMB DSC server. Get-DSCConfigurationStatus says the pull was successfull but Get-DSCConfiguration remains the same(old config). Im testing it with a HelloWorld config where a file is created on the C…
seyo -IV
  • 43
  • 7
1
vote
1 answer

Run Direct Access cmdlet remotely

I have a DirectAccess server up and running, has been for years and all is fine. But a nagging problem or issue that I have just never figured out is that I am trying to run the cmdlet Get-RemoteAccessConnectionStatistics remotely from my computer…
1
vote
1 answer

Powershell Array for Path

We are trying to break the following Path from the text file, the path is dynamic in length, i.e, it can be ABC\DSD\AAR\ARE or ABC\DSD. So we need a solution to break down the path as per the following…
1
vote
1 answer

How to properly run Powershell scripts containing BITS operations from Task Scheduler?

I am trying to perform an automatic backup of some files and folders based on a configuration. This is done using Powershell 5 which in turn relies on Background Intelligent Transfer Service (BITS). E.g.: Start-BitsTransfer $Source\* $Destination…
1
vote
2 answers

How to access result and volume of WindowsServerBackup via PowerShell?

I want to check automatically the latest WindowsServerBackup result via PowerShell on Windows Server 2012/2012 R2. It's not only "success" or "failure" but "backed-up volume" and "error message", too. So I tried using the following ways but I can't…
1
vote
1 answer

powershell 5.1 on windows server 2016 not working

I'm following exercise 1 of this Microsoft official Azure lab under the heading Deploying Azure SQL Database by using the Azure PowerShell. The VM machine in the lab is Windows Server 2016. When I run the the following command of step 6 it prompts…
nam
  • 217
  • 1
  • 11
1
vote
1 answer

How to tell what Operating System is running in HyperV VM with Powershell

So here's the environment. Host: Windows 10 Guests: Server 2012 and Server 2016 Purpose: Development system to automate pushing out builds to servers for testing during development. I've got a Powershell function as part of this full build script…
SamuelWarren
  • 113
  • 1
  • 5
1
vote
2 answers

Pushing a hosted Registry File to Multiple Servers

I have bunch of Servers I need to push this patch through. Normally I would load up a WSUS or equivalent. However I would like to get this working in a DSC enviroment. So I am testing scripts to put into place for this workflow. PowerShell complains…
mikedopp
  • 229
  • 2
  • 7
  • 16
1
vote
1 answer

Load a nuget package installed by Install-Package in Powershell v5.0+

In Powershell v5.1... If I install a .NET NuGet package (example: redmine-api) using this command: Install-Package redmine-api How do I then create a new object from that package for use in Powershell? I've tried: Add-Type -AssemblyName…
Adam
  • 111
  • 5
1
vote
0 answers

Go to network share\folder with Powershell

I'm trying to access a network share in PowerShell 5.1 with elevated permissions executing the following command: gi "\\192.168.1.1\data" I'm recieving the following error: gi : Cannot find path '\\192.168.1.1\data' because it does not exist. At…
ell
  • 11
  • 1
  • 2
1
vote
0 answers

How can I scrape the Meraki client page for devices and their owners?

I am trying to automate a weekly process where I download a CSV copy from the Client page on the Meraki website. Before I lose you I am aware there is an API and it works very well. However there in a device attribute that is not exposed in the…
Matt
  • 740
  • 6
  • 28
1
vote
2 answers

Clear-RecycleBin on remote computer fails

If I RDP to my Windows 2016 server (called LAUREL) and run this powershell, it works fine: Clear-RecycleBin -DriveLetter C -force However if I run from my Windows 10 workstation logged on as a Domain Admin, the command: icm -ComputerName laurel…
Mark Allison
  • 2,188
  • 7
  • 26
  • 45
1
vote
1 answer

Remote Invoke-Command Powershell Stop-WebAppPool No Longer Working After Powershell 5 Upgrade

We have a PowerShell script that takes down a remote app pool via the following commands: $appPoolName = "myAppPool" $server = "myserver.domain.com" $stopAppPoolScript = {param($appPoolname); Import-Module WebAdministration; Stop-WebAppPool -Name…
jakejgordon
  • 111
  • 4
1
vote
1 answer

WMF 5.0 (April Preview) DSC Pull Server Installation fails

I am trying to install The DSC-Service Windows Feature on a Windows 2012 R2 machine with WMF 5.0 already installed. The installation fails with the following errors: Install-WindowsFeature DSC-Service: Install-WindowsFeature : The request to add or…