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

      Delete All Emails From Single Folder Office 365 Powershell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion office365 powershell
      5
      0 Votes
      5 Posts
      819 Views
      D

      I believe if PowerShell is your method, you will not be able to do what you are trying to achieve. The only way now is to use the one that has just been advised.

    • scottalanmillerS

      List All Public Folders in Exchange or Office 365 with PowerShell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion exchange office 365 o365 powershell get-publicfolder email public folder
      2
      2 Votes
      2 Posts
      8k Views
      bbigfordB

      @scottalanmiller said in List All Public Folders in Exchange or Office 365 with PowerShell:

      Want to get a list of all of the public folders on your Exchange system, whether on premises or hosted, try this:

      Get-PublicFolder -Identity "\" -Recurse | Get-PublicFolderClientPermission | where{$_.Accessrights -eq "owner"}

      More on Get-PublicFolder from TechNet

      That's pretty cool. I was wondering why you were piping into every owner since you could create public folders in Exchange without delegating owners, but then I had remembered you can create them on the client side as well after a root or folders are created in Exchange and added to the client, which is explained in your first pipe. Thanks for the note.

    • S

      Creating GUI for DateTime Picker output to CSV file

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      7
      0 Votes
      7 Posts
      3k Views
      D

      @stess https://blogs.technet.microsoft.com/platformspfe/2014/01/20/integrating-xaml-into-powershell/ look at this. It gives the basics of integrating XAML into a PowerShell script and might be right what you are looking for.

    • OksanaO

      Don’t break fingers with hundreds of clicks – automate Windows iSCSI connections

      Watching Ignoring Scheduled Pinned Locked Moved Starwind csv iscsi powershell vsan
      1
      1 Votes
      1 Posts
      625 Views
      No one has replied
    • gjacobseG

      Powershell: Use PS to email results

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion ps powershell o365 sendmail
      14
      1 Votes
      14 Posts
      2k Views
      nadnerBN

      I can't remember where is nabbed it from, but I use the following:

      Function Mailer { $emailTo = "" $emailFrom = "" $subject="It's broken, damn it" $smtpserver="" $smtp=new-object System.Net.Mail.SmtpClient($smtpServer) $Message = @" Insert a useful/meaningful message here. "@ } Mailer

      Last line calls the function (duh for you, but a visitor here might not know).

    • LakshmanaL

      Verify the Logid status

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion active directory windows powershell search-adaccount
      35
      0 Votes
      35 Posts
      3k Views
      LakshmanaL

      @lakshmana The above helps me and its working but i need the output of that file to be append at the same .csv file which is not working.How to do that ?

    • OksanaO

      Migrating on-premises VHD files to Azure is not rocket science

      Watching Ignoring Scheduled Pinned Locked Moved Starwind azure microsoft powershell vhd
      3
      1 Votes
      3 Posts
      921 Views
      dbeatoD

      @black3dynamite said in Migrating on-premises VHD files to Azure is not rocket science:

      I can believe Azure still doesn't support vhdx.

      Although if you use an Generation 2 VM it is the only file supported
      https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn282285(v=ws.11)
      Still open case with Azure
      https://feedback.azure.com/forums/216843-virtual-machines/suggestions/4271962-upload-vhdx

    • scottalanmillerS

      Disable Screensaver and User Lockout with PowerShell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell windows windows 10 screensaver
      17
      2 Votes
      17 Posts
      12k Views
      T

      @travisdh1 said in Disable Screensaver and User Lockout with PowerShell:

      I'm resurrecting this old ghost today.

      I've got a couple of police computers that they want the screensaver password turned off for. Our remote registry editor doesn't have HKCU available of course, and Powershell is giving me the same sort of errors it was for @gjacobse. Did anyone ever get it figured out, or am I stuck waiting for them to call me back?

      You can always browse to the HKEY_Users then the SID for the current user that is loggged in using remote registry, this is the same thing as HKCU.

      Tip: if you don't want to look up the SID using powershell just right click on the SID and check the security settings, it should give you hints to who is who unless it's been customized.

    • JaredBuschJ

      Anyone have a powershell line to create a new admin account

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion windows 7 administrators powershell
      18
      2 Votes
      18 Posts
      2k Views
      matteo nunziatiM

      @jaredbusch said in Anyone have a powershell line to create a new admin account:

      I have a handful of Windows 7 machiens not on a domain.

      I want to put a new Admin account on them.

      The current user accounts have admin rights, which I will remove, I have ScreenConnect installed and running with admin perms. So I can pop a powershell via the ScreenConnect command window easily to do this.

      not tested... maybe this thread can help with PS 2.0. Quoting code here:

      # Create new local Admin user for script purposes $Computer = [ADSI]"WinNT://$Env:COMPUTERNAME,Computer" $LocalAdmin = $Computer.Create("User", "LocalAdmin") $LocalAdmin.SetPassword("Password01") $LocalAdmin.SetInfo() $LocalAdmin.FullName = "Local Admin by Powershell" $LocalAdmin.SetInfo() $LocalAdmin.UserFlags = 64 + 65536 # ADS_UF_PASSWD_CANT_CHANGE + ADS_UF_DONT_EXPIRE_PASSWD $LocalAdmin.SetInfo()
    • OksanaO

      Strengthening Cluster Shared Volume security with Microsoft BitLocker encryption

      Watching Ignoring Scheduled Pinned Locked Moved Starwind bitlocker microsoft encryption data protection starwind blog windows server cluster shared volume csv starwind powershell failover cluster
      1
      3 Votes
      1 Posts
      1k Views
      No one has replied
    • LakshmanaL

      Powershell Default User

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      26
      1 Votes
      26 Posts
      3k Views
      LakshmanaL

      @manxam Thanks now it works in command prompt from the .bat file

    • ObsolesceO

      PowerShell on Fedora 27

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion linux powershell powershell on linux fedora 27
      30
      1 Votes
      30 Posts
      5k Views
      ObsolesceO

      Works great on Fedora 27.

      dir alias is easier to type btw.

    • DustinB3403D

      Cross Post - Task scheduler intermittently running a powershell script

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell troubleshooting windows
      4
      1 Votes
      4 Posts
      750 Views
      ObsolesceO

      Having TaskScheduler in Windows run PowerShell scritps is like rolling dice depending on the context in which you are running the script...

      So when in doubt:

      I always have guaranteed success when starting the PS script from a batch file first from a scheduled task.

      Create a scheduled tasked using these lines in an elevated powershell window:

      Creates a scheduled task:

      $action = New-ScheduledTaskAction -Execute 'C:\ProgramData\scripts\PSKickoff.bat' $trigger = New-ScheduledTaskTrigger -AtStartup $principal = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $settings = New-ScheduledTaskSettingsSet $task = New-ScheduledTask -Action $action -Trigger $trigger -Principal $principal -Settings $settings Register-ScheduledTask -TaskName "Scheduled Task Friendly but Meaningful Name" -InputObject $task

      Note: Change above New-ScheduledTaskTrigger -AtStartup to match your schedule. Here's the info for it.

      The batch file that the scheduled task runs:

      Powershell.exe -executionpolicy bypass -File "C:\ProgramData\scripts\yourScript.ps1"
    • gjacobseG

      PS: O365 cmdlet issue.

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion o365 office365 powershell
      11
      0 Votes
      11 Posts
      2k Views
      scottalanmillerS

      @jaredbusch said in PS: O365 cmdlet issue.:

      @gjacobse said in PS: O365 cmdlet issue.:

      For my record later:

      /wtb codeblock around that... ```

      I fixed it.

    • FredtxF

      What does the >> cursor mean in Powershell after typing a command?

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion shell powershell
      6
      1 Votes
      6 Posts
      1k Views
      FredtxF

      @scottalanmiller That did the trick. Didn't even cross my mind. Thanks!

    • LakshmanaL

      Powershell output in Email is Possible

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell send-mailmessage windows scripting
      21
      1 Votes
      21 Posts
      4k Views
      ObsolesceO

      Here is a script I made to set up a scheduled task to either launch a PowerShell script, or a batch file.

      Comment out the $action line that you do NOT want to use. The below script will create a scheduled task that launches a PowerShell script called psScript.ps1.

      Note that you must execute these lines in an elevated PowerShell window.

      #Requires -RunAsAdministrator $action = New-ScheduledTaskAction -Execute 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -Argument "-ExecutionPolicy bypass -NonInteractive -NoLogo -NoProfile -File '\\server\path\to\psScript.ps1'" # $action = New-ScheduledTaskAction -Execute '\\server\path\to\batchFile.bat' $trigger = New-ScheduledTaskTrigger -AtLogon $principal = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $settings = New-ScheduledTaskSettingsSet $task = New-ScheduledTask -Action $action -Trigger $trigger -Principal $principal -Settings $settings Register-ScheduledTask -TaskName "kickoff" -InputObject $task

      If you choose to launch the PowerShell script via a batch file, here's what you need to have in your .bat file:

      Powershell.exe -executionpolicy bypass -File "\\server\path\to\psScript.ps1"
    • ObsolesceO

      PowerShell Regex - How to remove everything after first line?

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell regex computer name dell tag
      9
      1 Votes
      9 Posts
      3k Views
      travisdh1T

      @tim_g said in PowerShell Regex - How to remove everything after first line?:

      Actually, I'm sticking to this:

      $compName = Get-WmiObject win32_ComputerSystem | Select-Object -ExpandProperty Name if ($compName -match "WINDOWS") { $dellTag = Get-WmiObject win32_bios | Select-Object -ExpandProperty SerialNumber Rename-Computer -NewName $dellTag -Force -Restart } Exit

      Compared to sed, that makes my head hurt. Glad you got it sorted, and an example for when I'll need to do the same thing.

    • anthonyhA

      PowerShell - Script never completes. Is there a session timeout?

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell sql 2012 standard backup
      11
      4 Votes
      11 Posts
      2k Views
      anthonyhA

      @dafyre said in PowerShell - Script never completes. Is there a session timeout?:

      @anthonyh said in PowerShell - Script never completes. Is there a session timeout?:

      @dafyre said in PowerShell - Script never completes. Is there a session timeout?:

      ROFL. Not a problem. Things working as designed. Next!

      For what it's worth, my post was intended to be framed from the standpoint of "what am I doing wrong??" rather than "what's wrong with the system?!". I figured I was missing something stupid.

      Never hurts to have extra eyes. I didn't even think about the potential for this to be a scheduled job... God, I have a case of the Mondays.

      Not your fault at all. I did not mention it in my OP. Whoops. Perhaps I'm the one with a case of the Mondays.

    • DustinB3403D

      Powershell Directory Tree

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell folder tree directory tree
      8
      1 Votes
      8 Posts
      7k Views
      dafyreD

      @dustinb3403 You're welcome ! Glad you got it sorted.

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