ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Tags
    3. powershell
    Log in to post
    • All categories
    • gjacobseG

      O365 Public Folder: Script to Delete OLD items

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion o365 public folder powershell management politics retention
      4
      0 Votes
      4 Posts
      870 Views
      gjacobseG

      sadly - setting this didn't work as the 'mailbox' doesn't exist...

      Curse you MS

    • WrCombsW

      Uninstalling Programs (Windows 10) Using Powershell

      Watching Ignoring Scheduled Pinned Locked Moved Solved Water Closet powershell windows10 virtualbox
      27
      0 Votes
      27 Posts
      3k Views
      scottalanmillerS

      @wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:

      @jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:

      @scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:

      @wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:

      @scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:

      Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.

      I did install via Chocolatey does that have something to do with it?

      Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."

      Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).

      so by this information, one of the above commands should have worked?

      Not reliably. Only in the case, which might be "sometimes" and might be "often" and might be "almost always", where the one package manager used the other. So no matter how often it works, it's not "meant to work" and works only by coincidence. The coincidence might be really often, but it is still coincidence and not working by design.

    • gjacobseG

      Powershell Auditing Server ADUC

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion server 2012 server 2008 server 2008 r2 server maintenance aduc powershell reports
      5
      0 Votes
      5 Posts
      984 Views
      DustinB3403D

      @gjacobse

      You should just need to run this bit, nothing should have to be changed. DFL should be at least 2008

      # Imports Active Directory information Import-Module Activedirectory $credentials = Get-Credential # Prompts for user credentials default user is “ ”, enter an administrator account in the form of “domain-name\administrator-account” Get-ADUser -Credential $credentials -Filter * -Properties DisplayName,EmailAddress,memberof,DistinguishedName,Enabled | % { New-Object PSObject -Property @{ UserName = $_.DisplayName EmailAddress = $_.EmailAddress DistinguishedName = $_.DistinguishedName Enabled = $_.Enabled # Deliminates the document for easy copy and paste using ";" as the delimiter. Incredibly useful for Copy & Paste of group memberships to new hire employees. Groups = ($_.memberof | Get-ADGroup | Select -ExpandProperty Name) -join ";" } # The export path is variable change to desired location on domain controller or end user computer. } | Select UserName,EmailAddress,@{l='OU';e={$_.DistinguishedName.split(',')[1].split('=')[1]}},Groups,Enabled | Sort-Object Username | Export-Csv $ENV:UserProfile\Documents\User-Permissions.csv –NTI
    • EddieJenningsE

      Powershell Get-Childitem behavior with variables

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion windows server 2012 r2 powershell scripting
      11
      2 Votes
      11 Posts
      2k Views
      EddieJenningsE

      Must've been that one server. Seems like it's running fine on another one.

    • DustinB3403D

      Without rebooting. . .

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion hardware raid powershell
      7
      1 Votes
      7 Posts
      724 Views
      DustinB3403D

      It's using the Intel controller. . .

      powershell.exe get-disk
    • scottalanmillerS

      Change Drive Letter with PowerShell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion windows powershell
      6
      2 Votes
      6 Posts
      4k Views
      scottalanmillerS

      @denis_mcgee said in Change Drive Letter with PowerShell:

      Very convenient, as for me

      Thanks

    • scottalanmillerS

      Disable Network Level Authentication or NLA Remotely via PowerShell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion nla rdp powershell windows windows server credssp
      4
      2 Votes
      4 Posts
      20k Views
      scottalanmillerS

      @dbeato said in Disable Network Level Authentication or NLA Remotely via PowerShell:

      @scottalanmiller said in Disable Network Level Authentication or NLA Remotely via PowerShell:

      (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -ComputerName "remoteServer" -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0)

      This worked, but also as soon as the server is updated to the latest then the issue goes away.

      Yes, if you have that option.

    • scottalanmillerS

      PowerShell Failing to Run on Fedora 28

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion fedora fedora 28 xterm tilix cinnamon powershell powershell core 6 linux
      7
      2 Votes
      7 Posts
      2k Views
      scottalanmillerS

      @black3dynamite said in PowerShell Failing to Run on Fedora 28:

      Is that only a Fedora issue?

      No, definitely not isolated to Fedora. It's any distro, or any that are set up, in a way that PS doesn't like in terms of the xterm environmental. So most, I would assume, are affected, but all have a fix. It's a PS bug, and decently easy to work around.

    • gjacobseG

      PowerShell: Public Folder Search / remove

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion ps powershell office365 office 365 distro distribution groups addremove
      3
      0 Votes
      3 Posts
      787 Views
      black3dynamiteB

      @gjacobse said in PowerShell: Public Folder Search / remove:

      Is this what I am looking for?

      Remove-PublicFolderClientPermission -Identity "\My Public Folder" -User Contoso\Chris

      Looks correct to me.

    • JaredBuschJ

      Question about Filter function in PowerShell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell exchange windows update kb4072650
      10
      2 Votes
      10 Posts
      1k Views
      jt1001001J

      A bit outside your specific question; however on my Exchange servers I just disabled the MSExchange ActiveDirectory Topology Service; doing that prevented the rest of the Exchange services from loading and KB40720650 loaded without issue

    • gjacobseG

      ADUC: Use Powershell to Export list of User/Groups

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion aduc server 2012 active directory activedirectory powershell users export report
      2
      0 Votes
      2 Posts
      999 Views
      DustinB3403D

      I got you

      # This script will export all users of the specified domain, and their group memberships to a CSV file. The usefulness of this tool is expressed when # setting up new hire employees or reviewing domain membership permissions. # It's not advisable to store the user credentials required to run this script as they can be decrypted. This script is not designed to save these credentials but could be modified to do so. # Use of this script implies that you understand what it does, and will do to with regards to your Active Directory installation members and group memberships. # As designed there are no changes made to your installation, the script simply generates a report of members, and their group memberships. # Any changes to this script are the responsibility of the person/organization which made said changes. # We cannot be held responsible for your misuse or misunderstanding of this script as it was designed. # # # # # Imports Active Directory information Import-Module Activedirectory $credentials = Get-Credential # Prompts for user credentials default user is “ ”, enter an administrator account in the form of “domain-name\administrator-account” Get-ADUser -Credential $credentials -Filter * -Properties DisplayName,EmailAddress,memberof,DistinguishedName,Enabled | % { New-Object PSObject -Property @{ UserName = $_.DisplayName EmailAddress = $_.EmailAddress DistinguishedName = $_.DistinguishedName Enabled = $_.Enabled # Deliminates the document for easy copy and paste using ";" as the delimiter. Incredibly useful for Copy & Paste of group memberships to new hire employees. Groups = ($_.memberof | Get-ADGroup | Select -ExpandProperty Name) -join ";" } # The export path is variable change to desired location on domain controller or end user computer. } | Select UserName,EmailAddress,@{l='OU';e={$_.DistinguishedName.split(',')[1].split('=')[1]}},Groups,Enabled | Sort-Object Username | Export-Csv $ENV:UserProfile\Documents\User-Permissions.csv –NTI #Function Get-SaveFile($initialDirectory) #{ #[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | #Out-Null # #$SaveFileDialog = New-Object System.Windows.Forms.SaveFileDialog #$SaveFileDialog.initialDirectory = $initialDirectory #$SaveFileDialog.filter = "All files (*.*)| *.*" #$SaveFileDialog.ShowDialog() | Out-Null #$SaveFileDialog.filename #} # # # open dialog box to select the .nessuss file. #$InputFile = Get-OpenFile #$OutputFile = Get-SaveFile # # #$Contents = [io.file]::ReadAllText($inputfile) #$Contents = [io.file]::ReadAllText('C:\tools\wd\nessus\data\data.xml') #$Global:OutFile = [System.IO.StreamWriter] "c:\tools\wd\nessus\outfile.csv" # ##$InputFile #$OutputFile #
    • gjacobseG

      PS: Find File path Length

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell server 2012 server filepath file path file system exceeds 260 limit
      1
      5 Votes
      1 Posts
      746 Views
      No one has replied
    • dbeatoD

      Exporting DefaultAssociation XML file Fails

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion dism powershell windows 10
      2
      3 Votes
      2 Posts
      2k Views
      DustinB3403D

      The response from Microsoft for this issue is surprisingly quiet.

    • NerdyDadN

      Mapping OneDrive Business to a drive letter

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion powershell onedrive for business
      75
      0 Votes
      75 Posts
      15k Views
      NerdyDadN

      @dafyre said in Mapping OneDrive Business to a drive letter:

      @nerdydad said in Mapping OneDrive Business to a drive letter:

      @phlipelder said in Mapping OneDrive Business to a drive letter:

      @nerdydad That's not for the user. That's for the admin who then delivers that via whatever management solution they use.

      Quick Access/Favorites can be Group Policy managed so all or some domain members can get it easily.

      For external users it's a two step process to send them a shortcut and they know how to log on from there.

      There are 4 RDP servers, brokered together for our ERP system, along with all of the off-chutes that some users will have with some other servers for whatever reason, plus their desktop, for 130 users.

      I find the most difficult part of managing an RDP farm is getting the apps themselves to play nicely. I've only had a couple of apps that just flat out refused to work correctly.

      Since this is all virtualized, I'll just take one server, sysprep it, shut it down, and then just clone it. Apps are all the exact same. The only thing that needs to change are the UUID's and the database.

    • AdamFA

      IIS Security setup

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion iis powershell security ssl
      17
      0 Votes
      17 Posts
      3k Views
      AdamFA

      @psx_defector said in IIS Security setup:

      Best practice isn't up to date.

      Set it to PCI 1.2, that disables TLS1.0, all the AES stuff, etc. etc. You can also disable them manually in the first screen.

      Great, thanks.

    • DustinB3403D

      Creating Scheduled Task with Powershell - Using specific user account

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion powershell windows 10 scripting chocolatey task scheduler
      22
      0 Votes
      22 Posts
      9k Views
      ObsolesceO

      @wrx7m said in Creating Scheduled Task with Powershell - Using specific user account:

      @obsolesce said in Creating Scheduled Task with Powershell - Using specific user account:

      I know this post is old, but I've found doing scheduled tasks with SaltStack is insanely simple and very effective lately... so much more than using MS Group Policy.

      https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_task.html

      I really want to get back into learning saltstack again.

      Here's an example of a task that goes to all minions it's supposed to go to... and it "just works". No AD required.
      Also, using SaltStack to sync that .ps1 it runs from GitLab:

      0_1525903964206_a7c132dd-863e-484e-a947-e291f463a810-image.png

    • OksanaO

      Be smart, automate boring stuff like Microsoft Hyper-V Live Migration: handy PowerShell scripts and tips

      Watching Ignoring Scheduled Pinned Locked Moved Starwind microsoft hyper-v activedirectory ad powershell livemigration
      1
      2 Votes
      1 Posts
      626 Views
      No one has replied
    • gjacobseG

      Server 2012: PS Get-ADGroupMember

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion 2012 2012 r2 windows server 2012 server 2012 r2 powershell
      26
      0 Votes
      26 Posts
      4k Views
      scottalanmillerS

      @obsolesce said in Server 2012: PS Get-ADGroupMember:

      I use a Linux server that is domain joined to see what groups a MS AD user is a member of. It's just way easier and faster.

      id [email protected]

      Done.

      I was just saying how ridiculously cumbersome this is because of Windows.

    • DustinB3403D

      Powershell create shortcut to server root share

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      9
      2 Votes
      9 Posts
      882 Views
      DustinB3403D

      @jaredbusch said in Powershell create shortcut to server root share:

      @DustinB3403 what about the public desktop instead of hte user desktop?

      Then it will always be there, regardless of who logs in.

      Not a huge concern for our use cases as we usually just end up wiping a system and reloading between user changes.

      I thought about it, but it wasn't critical and as we change things around it becomes a pain to remove the old links to systems that may not exist any more.

    • LakshmanaL

      Powershell Integration Help Needed

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      6
      2 Votes
      6 Posts
      946 Views
      LakshmanaL

      This sorted out

      clipboard | select skip -7| out-string

    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 6 / 11